-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade OTel from v0.87.0 to v0.96.0 #6725
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,13 +67,15 @@ otelcol.connector.spanmetrics "LABEL" { | |
|
||
`otelcol.connector.spanmetrics` supports the following arguments: | ||
|
||
| Name | Type | Description | Default | Required | | ||
| ------------------------- | -------------- | --------------------------------------------------------------------- | -------------- | -------- | | ||
| `dimensions_cache_size` | `number` | How many dimensions to cache. | `1000` | no | | ||
| `aggregation_temporality` | `string` | Configures whether to reset the metrics after flushing. | `"CUMULATIVE"` | no | | ||
| `metrics_flush_interval` | `duration` | How often to flush generated metrics. | `"15s"` | no | | ||
| `namespace` | `string` | Metric namespace. | `""` | no | | ||
| `exclude_dimensions` | `list(string)` | List of dimensions to be excluded from the default set of dimensions. | `false` | no | | ||
| Name | Type | Description | Default | Required | | ||
| --------------------------------- | -------------- | ------------------------------------------------------------------------------------------ | -------------- | -------- | | ||
| `aggregation_temporality` | `string` | Configures whether to reset the metrics after flushing. | `"CUMULATIVE"` | no | | ||
| `dimensions_cache_size` | `number` | How many dimensions to cache. | `1000` | no | | ||
| `exclude_dimensions` | `list(string)` | List of dimensions to be excluded from the default set of dimensions. | `[]` | no | | ||
| `metrics_flush_interval` | `duration` | How often to flush generated metrics. | `"15s"` | no | | ||
| `namespace` | `string` | Metric namespace. | `""` | no | | ||
| `resource_metrics_cache_size` | `number` | The size of the cache holding metrics for a service. | `1000` | no | | ||
| `resource_metrics_key_attributes` | `list(string)` | Span resources with the same values for those resource attributes are aggregated together. | `[]` | no | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I did not find this sentence very clear "Span resources with the same values for those resource attributes are aggregated together." |
||
|
||
Adjusting `dimensions_cache_size` can improve the Agent process' memory usage. | ||
|
||
|
@@ -84,19 +86,28 @@ The supported values for `aggregation_temporality` are: | |
|
||
If `namespace` is set, the generated metric name will be added a `namespace.` prefix. | ||
|
||
`resource_metrics_cache_size` is mostly relevant for cumulative temporality. It helps avoid issues with increasing memory and with incorrect metric timestamp resets. | ||
|
||
`resource_metrics_key_attributes` can be used to avoid situations where resource attributes may change across service restarts, | ||
causing metric counters to break (and duplicate). A resource does not need to have all of the attributes. | ||
The list must include enough attributes to properly identify unique resources or risk aggregating data from more than one service and span. | ||
For example, `["service.name", "telemetry.sdk.language", "telemetry.sdk.name"]`. | ||
|
||
## Blocks | ||
|
||
The following blocks are supported inside the definition of | ||
`otelcol.connector.spanmetrics`: | ||
|
||
| Hierarchy | Block | Description | Required | | ||
| ----------------------- | --------------- | ------------------------------------------------------- | -------- | | ||
| dimension | [dimension][] | Dimensions to be added in addition to the default ones. | no | | ||
| histogram | [histogram][] | Configures the histogram derived from spans durations. | yes | | ||
| histogram > exponential | [exponential][] | Configuration for a histogram with exponential buckets. | no | | ||
| histogram > explicit | [explicit][] | Configuration for a histogram with explicit buckets. | no | | ||
| exemplars | [exemplars][] | Configures how to attach exemplars to histograms. | no | | ||
| output | [output][] | Configures where to send telemetry data. | yes | | ||
| Hierarchy | Block | Description | Required | | ||
| ----------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | ||
| dimension | [dimension][] | Dimensions to be added in addition to the default ones. | no | | ||
| events | [events][] | Configures the events metric. | no | | ||
| events > dimension | [dimension][] | Span event attributes to add as dimensions to the events metric, _on top of_ the default ones and the ones configured in the top-level `dimension` block. | no | | ||
| exemplars | [exemplars][] | Configures how to attach exemplars to histograms. | no | | ||
| histogram | [histogram][] | Configures the histogram derived from spans durations. | yes | | ||
| histogram > explicit | [explicit][] | Configuration for a histogram with explicit buckets. | no | | ||
| histogram > exponential | [exponential][] | Configuration for a histogram with exponential buckets. | no | | ||
| output | [output][] | Configures where to send telemetry data. | yes | | ||
|
||
It is necessary to specify either a "[exponential][]" or an "[explicit][]" block: | ||
|
||
|
@@ -108,6 +119,7 @@ It is necessary to specify either a "[exponential][]" or an "[explicit][]" block | |
[exponential]: #exponential-block | ||
[explicit]: #explicit-block | ||
[exemplars]: #exemplars-block | ||
[events]: #events-block | ||
[output]: #output-block | ||
|
||
### dimension block | ||
|
@@ -128,8 +140,8 @@ The following attributes are supported: | |
|
||
| Name | Type | Description | Default | Required | | ||
| --------- | -------- | ------------------------------------------------ | ------- | -------- | | ||
| `name` | `string` | Span attribute or resource attribute to look up. | | yes | | ||
| `default` | `string` | Value to use if the attribute is missing. | null | no | | ||
| `name` | `string` | Span attribute or resource attribute to look up. | | yes | | ||
|
||
`otelcol.connector.spanmetrics` will look for the `name` attribute in the span's | ||
collection of attributes. If it is not found, the resource attributes will be checked. | ||
|
@@ -139,6 +151,20 @@ If the attribute is missing in both the span and resource attributes: | |
- If `default` is not set, the dimension will be omitted. | ||
- If `default` is set, the dimension will be added and its value will be set to the value of `default`. | ||
|
||
### events block | ||
|
||
The `events` block configures the `events` metric, which tracks [span events][span-events]. | ||
|
||
The following attributes are supported: | ||
|
||
| Name | Type | Description | Default | Required | | ||
| --------- | ------ | -------------------------- | ------- | -------- | | ||
| `enabled` | `bool` | Enables all events metric. | `false` | no | | ||
|
||
At least one `dimension` block is required if `enabled` is set to `true`. | ||
|
||
[span-events]: https://opentelemetry.io/docs/concepts/signals/traces/#span-events | ||
|
||
### histogram block | ||
|
||
The `histogram` block configures the histogram derived from spans' durations. | ||
|
@@ -147,8 +173,8 @@ The following attributes are supported: | |
|
||
| Name | Type | Description | Default | Required | | ||
| --------- | -------- | ------------------------------- | ------- | -------- | | ||
| `unit` | `string` | Configures the histogram units. | `"ms"` | no | | ||
| `disable` | `bool` | Disable all histogram metrics. | `false` | no | | ||
| `unit` | `string` | Configures the histogram units. | `"ms"` | no | | ||
|
||
The supported values for `unit` are: | ||
|
||
|
@@ -181,9 +207,12 @@ The `exemplars` block configures how to attach exemplars to histograms. | |
|
||
The following attributes are supported: | ||
|
||
| Name | Type | Description | Default | Required | | ||
| --------- | ------ | -------------------------------------------------- | ------- | -------- | | ||
| `enabled` | `bool` | Configures whether to add exemplars to histograms. | `false` | no | | ||
| Name | Type | Description | Default | Required | | ||
| -------------------- | -------- | --------------------------------------------------------------------------- | ------- | -------- | | ||
| `enabled` | `bool` | Configures whether to add exemplars to histograms. | `false` | no | | ||
| `max_per_data_point` | `number` | Limits the number of exemplars that can be added to a unique dimension set. | `null` | no | | ||
|
||
`max_per_data_point` can help with reducing memory consumption. | ||
|
||
### output block | ||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this link is wrong, it should be open-telemetry/opentelemetry-collector-contrib#29242