diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d1b094fc09..575b1eee41b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,7 +85,7 @@ https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/26115 * [otelcol.connector.spanmetrics] Add a new `events` metric. https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27451 * [otelcol.connector.spanmetrics] A new `max_per_data_point` argument for exemplar generation. - * https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/22620 + * https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29242 * [ottl] Add IsBool Converter https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27897 * [otelcol.processor.tail_sampling] Optimize memory performance of tailsamplingprocessor diff --git a/docs/sources/flow/reference/components/otelcol.connector.spanmetrics.md b/docs/sources/flow/reference/components/otelcol.connector.spanmetrics.md index 2ef2ff67ab39..bfbcec6a129a 100644 --- a/docs/sources/flow/reference/components/otelcol.connector.spanmetrics.md +++ b/docs/sources/flow/reference/components/otelcol.connector.spanmetrics.md @@ -75,7 +75,7 @@ otelcol.connector.spanmetrics "LABEL" { | `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 | +| `resource_metrics_key_attributes` | `list(string)` | Limits the resource attributes used to create the metrics. | `[]` | no | Adjusting `dimensions_cache_size` can improve the Agent process' memory usage. @@ -808,4 +808,4 @@ Connecting some components may not be sensible or components may require further Refer to the linked documentation for more details. {{< /admonition >}} - \ No newline at end of file + diff --git a/docs/sources/flow/reference/components/otelcol.exporter.otlphttp.md b/docs/sources/flow/reference/components/otelcol.exporter.otlphttp.md index e0d4dda49477..bf743e547912 100644 --- a/docs/sources/flow/reference/components/otelcol.exporter.otlphttp.md +++ b/docs/sources/flow/reference/components/otelcol.exporter.otlphttp.md @@ -100,6 +100,8 @@ Before enabling this option, consider whether changes to idle connection setting If `http2_ping_timeout` is unset or set to `0s`, it will default to `15s`. +If `http2_read_idle_timeout` is unset or set to `0s`, then no health check will be performed. + {{< docs/shared lookup="flow/reference/components/otelcol-compression-field.md" source="agent" version="" >}} ### tls block @@ -177,4 +179,4 @@ Connecting some components may not be sensible or components may require further Refer to the linked documentation for more details. {{< /admonition >}} - \ No newline at end of file + diff --git a/docs/sources/shared/flow/reference/components/extract-field-block.md b/docs/sources/shared/flow/reference/components/extract-field-block.md index 207f2bc6053d..51ae70ed2a63 100644 --- a/docs/sources/shared/flow/reference/components/extract-field-block.md +++ b/docs/sources/shared/flow/reference/components/extract-field-block.md @@ -12,13 +12,13 @@ headless: true The following attributes are supported: -Name | Type | Description | Default | Required -------------|----------|----------------------------------------------------------------------------------------|---------|--------- -`from` | `string` | The source of the labels or annotations. Allowed values are `pod` and `namespace`. | `pod` | no -`key_regex` | `string` | A regular expression used to extract a key that matches the regular expression. | `""` | no -`key` | `string` | The annotation or label name. This key must exactly match an annotation or label name. | `""` | no -`regex` | `string` | An optional field used to extract a sub-string from a complex field value. | `""` | no -`tag_name` | `string` | The name of the resource attribute added to logs, metrics, or spans. | `""` | no +Name | Type | Description | Default | Required +------------|----------|-----------------------------------------------------------------------------------------------|---------|--------- +`from` | `string` | The source of the labels or annotations. Allowed values are `pod`, `namespace`, and `node`. | `pod` | no +`key_regex` | `string` | A regular expression used to extract a key that matches the regular expression. | `""` | no +`key` | `string` | The annotation or label name. This key must exactly match an annotation or label name. | `""` | no +`regex` | `string` | An optional field used to extract a sub-string from a complex field value. | `""` | no +`tag_name` | `string` | The name of the resource attribute added to logs, metrics, or spans. | `""` | no When you don't specify the `tag_name`, a default tag name is used with the format: * `k8s.pod.annotations.` diff --git a/internal/component/otelcol/exporter/otlphttp/otlphttp.go b/internal/component/otelcol/exporter/otlphttp/otlphttp.go index 66292554068d..667bc394ab4d 100644 --- a/internal/component/otelcol/exporter/otlphttp/otlphttp.go +++ b/internal/component/otelcol/exporter/otlphttp/otlphttp.go @@ -3,6 +3,7 @@ package otlphttp import ( "errors" + "fmt" "time" "github.com/grafana/agent/internal/component" @@ -100,7 +101,7 @@ func (args *Arguments) Validate() error { return errors.New("at least one endpoint must be specified") } if args.Encoding != EncodingProto && args.Encoding != EncodingJSON { - return errors.New("invalid encoding type") + return fmt.Errorf("invalid encoding type %s", args.Encoding) } return nil } diff --git a/internal/static/traces/config.go b/internal/static/traces/config.go index 80de470ed812..93364ea5ee37 100644 --- a/internal/static/traces/config.go +++ b/internal/static/traces/config.go @@ -168,9 +168,7 @@ type InstanceConfig struct { // Hides the value of the string during marshaling. type SecretString string -var ( - _ yaml.Marshaler = (*SecretString)(nil) -) +var _ yaml.Marshaler = (*SecretString)(nil) // MarshalYAML implements yaml.Marshaler. func (s SecretString) MarshalYAML() (interface{}, error) { @@ -182,9 +180,7 @@ func (s SecretString) MarshalYAML() (interface{}, error) { // ReceiverMap will marshal as YAML to the text "". type JaegerRemoteSamplingConfig map[string]interface{} -var ( - _ yaml.Marshaler = (*JaegerRemoteSamplingConfig)(nil) -) +var _ yaml.Marshaler = (*JaegerRemoteSamplingConfig)(nil) // MarshalYAML implements yaml.Marshaler. func (jrsm JaegerRemoteSamplingConfig) MarshalYAML() (interface{}, error) { @@ -1024,7 +1020,7 @@ func otelcolConfigFromStringMap(otelMapStructure map[string]interface{}, factori func validateConfigFromFactories(factories otelcol.Factories) error { var errs error - //TODO: We should not use componenttest in non-test code + // TODO: We should not use componenttest in non-test code for _, factory := range factories.Receivers { errs = multierr.Append(errs, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) } diff --git a/internal/static/traces/config_test.go b/internal/static/traces/config_test.go index 687eaf30de58..b7b2af4946e0 100644 --- a/internal/static/traces/config_test.go +++ b/internal/static/traces/config_test.go @@ -1159,8 +1159,8 @@ remote_write: scopes: ["api.metrics"] timeout: 2s `, - //TODO(ptodev): Look into why we need to add a "cipher_suites: []" explicitly. - // The expected config should unmarshal it to [], but instead it sets it to nil. + // The tls.ciphersuites would appear that it should output nothing or nil but during the conversion otelcolConfigFromStringMap the otelcol.Unmarshal converts the nil array to a blank one []. This is specifically used + // in confmap.go that transforms nil arrays into [] on the zeroSliceHookFunc. expectedConfig: ` receivers: push_receiver: {} @@ -1221,8 +1221,6 @@ remote_write: min_version: 1.3 reload_interval: 1h `, - //TODO(ptodev): Look into why we need to add a "cipher_suites: []" explicitly. - // The expected config should unmarshal it to [], but instead it sets it to nil. expectedConfig: ` receivers: push_receiver: {} @@ -1292,8 +1290,6 @@ remote_write: max_version: 1.2 reload_interval: 1h `, - //TODO: Look into why we need to add a "cipher_suites: []" explicitly. - // The expected config should unmarshal it to [], but instead it sets it to nil. expectedConfig: ` receivers: push_receiver: {} @@ -1361,8 +1357,6 @@ remote_write: scopes: ["api.metrics"] timeout: 2s `, - //TODO: Look into why we need to add a "cipher_suites: []" explicitly. - // The expected config should unmarshal it to [], but instead it sets it to nil. expectedConfig: ` receivers: push_receiver: {} @@ -1431,8 +1425,6 @@ remote_write: tls: insecure: true `, - //TODO: Look into why we need to add a "cipher_suites: []" explicitly. - // The expected config should unmarshal it to [], but instead it sets it to nil. expectedConfig: ` receivers: push_receiver: {}