diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b44e14e5a5e..f14513cc1174 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ internal API changes are not present. Main (unreleased) ----------------- +### Breaking changes + +- Remove `otelcol.exporter.jaeger` component (@hainenber) + ### Features - Added a new `stage.decolorize` stage to `loki.process` component which diff --git a/component/all/all.go b/component/all/all.go index 4d8d0fe8275d..6657a7bc68d5 100644 --- a/component/all/all.go +++ b/component/all/all.go @@ -66,7 +66,6 @@ import ( _ "github.com/grafana/agent/component/otelcol/connector/servicegraph" // Import otelcol.connector.servicegraph _ "github.com/grafana/agent/component/otelcol/connector/spanlogs" // Import otelcol.connector.spanlogs _ "github.com/grafana/agent/component/otelcol/connector/spanmetrics" // Import otelcol.connector.spanmetrics - _ "github.com/grafana/agent/component/otelcol/exporter/jaeger" // Import otelcol.exporter.jaeger _ "github.com/grafana/agent/component/otelcol/exporter/loadbalancing" // Import otelcol.exporter.loadbalancing _ "github.com/grafana/agent/component/otelcol/exporter/logging" // Import otelcol.exporter.logging _ "github.com/grafana/agent/component/otelcol/exporter/loki" // Import otelcol.exporter.loki diff --git a/component/loki/source/internal/kafkatarget/target_syncer_test.go b/component/loki/source/internal/kafkatarget/target_syncer_test.go index 8c1b755b4cde..1e1a417cab5b 100644 --- a/component/loki/source/internal/kafkatarget/target_syncer_test.go +++ b/component/loki/source/internal/kafkatarget/target_syncer_test.go @@ -64,7 +64,7 @@ func Test_TopicDiscovery(t *testing.T) { } group.mut.Unlock() return reflect.DeepEqual([]string{"topic1"}, group.GetTopics()) - }, time.Second, time.Millisecond, "expected topics: %v, got: %v", []string{"topic1"}, group.GetTopics()) + }, 5*time.Second, 100*time.Millisecond, "expected topics: %v, got: %v", []string{"topic1"}, group.GetTopics()) client.UpdateTopics([]string{"topic1", "topic2"}) @@ -75,7 +75,7 @@ func Test_TopicDiscovery(t *testing.T) { } group.mut.Unlock() return reflect.DeepEqual([]string{"topic1", "topic2"}, group.GetTopics()) - }, time.Second, time.Millisecond, "expected topics: %v, got: %v", []string{"topic1", "topic2"}, group.GetTopics()) + }, 5*time.Second, 100*time.Millisecond, "expected topics: %v, got: %v", []string{"topic1", "topic2"}, group.GetTopics()) require.NoError(t, ts.Stop()) require.True(t, closed) diff --git a/component/otelcol/exporter/jaeger/jaeger.go b/component/otelcol/exporter/jaeger/jaeger.go deleted file mode 100644 index ca4cf1b84e57..000000000000 --- a/component/otelcol/exporter/jaeger/jaeger.go +++ /dev/null @@ -1,102 +0,0 @@ -// Package jaeger provides an otelcol.exporter.jaeger component. -package jaeger - -import ( - "time" - - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter" - otel_service "github.com/grafana/agent/service/otel" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter" - otelcomponent "go.opentelemetry.io/collector/component" - otelpexporterhelper "go.opentelemetry.io/collector/exporter/exporterhelper" - otelextension "go.opentelemetry.io/collector/extension" -) - -func init() { - component.Register(component.Registration{ - Name: "otelcol.exporter.jaeger", - Args: Arguments{}, - Exports: otelcol.ConsumerExports{}, - NeedsServices: []string{otel_service.ServiceName}, - - Build: func(opts component.Options, args component.Arguments) (component.Component, error) { - fact := jaegerexporter.NewFactory() - return exporter.New(opts, fact, args.(Arguments)) - }, - }) -} - -// Arguments configures the otelcol.exporter.jaeger component. -type Arguments struct { - Timeout time.Duration `river:"timeout,attr,optional"` - - Queue otelcol.QueueArguments `river:"sending_queue,block,optional"` - Retry otelcol.RetryArguments `river:"retry_on_failure,block,optional"` - - // DebugMetrics configures component internal metrics. Optional. - DebugMetrics otelcol.DebugMetricsArguments `river:"debug_metrics,block,optional"` - - Client GRPCClientArguments `river:"client,block"` -} - -var _ exporter.Arguments = Arguments{} - -// DefaultArguments holds default values for Arguments. -var DefaultArguments = Arguments{ - Timeout: otelcol.DefaultTimeout, - Queue: otelcol.DefaultQueueArguments, - Retry: otelcol.DefaultRetryArguments, - Client: DefaultGRPCClientArguments, -} - -// SetToDefault implements river.Defaulter. -func (args *Arguments) SetToDefault() { - *args = DefaultArguments -} - -// Convert implements exporter.Arguments. -func (args Arguments) Convert() (otelcomponent.Config, error) { - return &jaegerexporter.Config{ - TimeoutSettings: otelpexporterhelper.TimeoutSettings{ - Timeout: args.Timeout, - }, - QueueSettings: *args.Queue.Convert(), - RetrySettings: *args.Retry.Convert(), - GRPCClientSettings: *(*otelcol.GRPCClientArguments)(&args.Client).Convert(), - }, nil -} - -// Extensions implements exporter.Arguments. -func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension { - return (*otelcol.GRPCClientArguments)(&args.Client).Extensions() -} - -// Exporters implements exporter.Arguments. -func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component { - return nil -} - -// DebugMetricsConfig implements receiver.Arguments. -func (args Arguments) DebugMetricsConfig() otelcol.DebugMetricsArguments { - return args.DebugMetrics -} - -// GRPCClientArguments is used to configure otelcol.exporter.jaeger with -// component-specific defaults. -type GRPCClientArguments otelcol.GRPCClientArguments - -// DefaultGRPCClientArguments holds component-specific default settings for -// GRPCClientArguments. -var DefaultGRPCClientArguments = GRPCClientArguments{ - Headers: map[string]string{}, - Compression: otelcol.CompressionTypeGzip, - WriteBufferSize: 512 * 1024, - BalancerName: "pick_first", -} - -// SetToDefault implements river.Defaulter. -func (args *GRPCClientArguments) SetToDefault() { - *args = DefaultGRPCClientArguments -} diff --git a/component/otelcol/processor/discovery/discovery_test.go b/component/otelcol/processor/discovery/discovery_test.go index de1985cd3946..aa909a45dbd7 100644 --- a/component/otelcol/processor/discovery/discovery_test.go +++ b/component/otelcol/processor/discovery/discovery_test.go @@ -237,13 +237,13 @@ func Test_Insert(t *testing.T) { "key": "ip", "value": { "stringValue": "1.2.2.2" } }, - { - "key": "test_label", - "value": { "stringValue": "test_val2" } - }, { "key": "test.label.with.dots", "value": { "stringValue": "test.val2.with.dots" } + }, + { + "key": "test_label", + "value": { "stringValue": "test_val2" } }] }, "scopeSpans": [{ diff --git a/docs/sources/flow/reference/components/otelcol.exporter.jaeger.md b/docs/sources/flow/reference/components/otelcol.exporter.jaeger.md deleted file mode 100644 index 8c12d00bfe50..000000000000 --- a/docs/sources/flow/reference/components/otelcol.exporter.jaeger.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -aliases: -- /docs/grafana-cloud/agent/flow/reference/components/otelcol.exporter.jaeger/ -- /docs/grafana-cloud/monitor-infrastructure/agent/flow/reference/components/otelcol.exporter.jaeger/ -- /docs/grafana-cloud/monitor-infrastructure/integrations/agent/flow/reference/components/otelcol.exporter.jaeger/ -canonical: https://grafana.com/docs/agent/latest/flow/reference/components/otelcol.exporter.jaeger/ -title: otelcol.exporter.jaeger -description: Learn about otelcol.exporter.jaeger ---- - -# otelcol.exporter.jaeger - -`otelcol.exporter.jaeger` accepts telemetry data from other `otelcol` components -and writes them over the network using the Jaeger protocol. - -> **NOTE**: `otelcol.exporter.jaeger` is a wrapper over the -> [upstream](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/jaegerexporter) -> OpenTelemetry Collector `jaeger` exporter. The upstream -> exporter has been deprecated and will be removed from future versions of -> both OpenTelemetry Collector and Grafana Agent because Jaeger supports OTLP directly. - -Multiple `otelcol.exporter.jaeger` components can be specified by giving them -different labels. - -## Usage - -```river -otelcol.exporter.jaeger "LABEL" { - client { - endpoint = "HOST:PORT" - } -} -``` - -## Arguments - -`otelcol.exporter.jaeger` supports the following arguments: - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`timeout` | `duration` | Time to wait before marking a request as failed. | `"5s"` | no - -## Blocks - -The following blocks are supported inside the definition of -`otelcol.exporter.jaeger`: - -Hierarchy | Block | Description | Required ---------- | ----- | ----------- | -------- -client | [client][] | Configures the gRPC server to send telemetry data to. | yes -client > tls | [tls][] | Configures TLS for the gRPC client. | no -client > keepalive | [keepalive][] | Configures keepalive settings for the gRPC client. | no -sending_queue | [sending_queue][] | Configures batching of data before sending. | no -retry_on_failure | [retry_on_failure][] | Configures retry mechanism for failed requests. | no -debug_metrics | [debug_metrics][] | Configures the metrics that this component generates to monitor its state. | no - -The `>` symbol indicates deeper levels of nesting. For example, `client > tls` -refers to a `tls` block defined inside a `client` block. - -[client]: #client-block -[tls]: #tls-block -[keepalive]: #keepalive-block -[sending_queue]: #sending_queue-block -[retry_on_failure]: #retry_on_failure-block -[debug_metrics]: #debug_metrics-block - -### client block - -The `client` block configures the gRPC client used by the component. - -The following arguments are supported: - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`endpoint` | `string` | `host:port` to send telemetry data to. | | yes -`compression` | `string` | Compression mechanism to use for requests. | `"gzip"` | no -`read_buffer_size` | `string` | Size of the read buffer the gRPC client to use for reading server responses. | | no -`write_buffer_size` | `string` | Size of the write buffer the gRPC client to use for writing requests. | `"512KiB"` | no -`wait_for_ready` | `boolean` | Waits for gRPC connection to be in the `READY` state before sending data. | `false` | no -`headers` | `map(string)` | Additional headers to send with the request. | `{}` | no -`balancer_name` | `string` | Which gRPC client-side load balancer to use for requests. | `pick_first` | no -`authority` | `string` | Overrides the default `:authority` header in gRPC requests from the gRPC client. | | no -`auth` | `capsule(otelcol.Handler)` | Handler from an `otelcol.auth` component to use for authenticating requests. | | no - -{{< docs/shared lookup="flow/reference/components/otelcol-compression-field.md" source="agent" version="" >}} - -{{< docs/shared lookup="flow/reference/components/otelcol-grpc-balancer-name.md" source="agent" version="" >}} - -{{< docs/shared lookup="flow/reference/components/otelcol-grpc-authority.md" source="agent" version="" >}} - -An HTTP proxy can be configured through the following environment variables: - -* `HTTPS_PROXY` -* `NO_PROXY` - -The `HTTPS_PROXY` environment variable specifies a URL to use for proxying -requests. Connections to the proxy are established via [the `HTTP CONNECT` -method][HTTP CONNECT]. - -The `NO_PROXY` environment variable is an optional list of comma-separated -hostnames for which the HTTPS proxy should _not_ be used. Each hostname can be -provided as an IP address (`1.2.3.4`), an IP address in CIDR notation -(`1.2.3.4/8`), a domain name (`example.com`), or `*`. A domain name matches -that domain and all subdomains. A domain name with a leading "." -(`.example.com`) matches subdomains only. `NO_PROXY` is only read when -`HTTPS_PROXY` is set. - -Because `otelcol.exporter.jaeger` uses gRPC, the configured proxy server must be -able to handle and proxy HTTP/2 traffic. - -[HTTP CONNECT]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT - -### tls block - -The `tls` block configures TLS settings used for the connection to the gRPC -server. - -{{< docs/shared lookup="flow/reference/components/otelcol-tls-config-block.md" source="agent" version="" >}} - -### keepalive block - -The `keepalive` block configures keepalive settings for gRPC client -connections. - -The following arguments are supported: - -Name | Type | Description | Default | Required ----- | ---- | ----------- | ------- | -------- -`ping_wait` | `duration` | How often to ping the server after no activity. | | no -`ping_response_timeout` | `duration` | Time to wait before closing inactive connections if the server does not respond to a ping. | | no -`ping_without_stream` | `boolean` | Send pings even if there is no active stream request. | | no - -### sending_queue block - -The `sending_queue` block configures an in-memory buffer of batches before data is sent -to the gRPC server. - -{{< docs/shared lookup="flow/reference/components/otelcol-queue-block.md" source="agent" version="" >}} - -### retry_on_failure block - -The `retry_on_failure` block configures how failed requests to the gRPC server are -retried. - -{{< docs/shared lookup="flow/reference/components/otelcol-retry-block.md" source="agent" version="" >}} - -### debug_metrics block - -{{< docs/shared lookup="flow/reference/components/otelcol-debug-metrics-block.md" source="agent" version="" >}} - -## Exported fields - -The following fields are exported and can be referenced by other components: - -Name | Type | Description ----- | ---- | ----------- -`input` | `otelcol.Consumer` | A value that other components can use to send telemetry data to. - -`input` accepts `otelcol.Consumer` data for any telemetry signal (metrics, -logs, or traces). - -## Component health - -`otelcol.exporter.jaeger` is only reported as unhealthy if given an invalid -configuration. - -## Debug information - -`otelcol.exporter.jaeger` does not expose any component-specific debug -information. - -## Example - -This example accepts OTLP traces over gRPC, sends them to a batch processor and forwards to Jaeger without TLS: - -```river -otelcol.receiver.otlp "default" { - grpc {} - output { - traces = [otelcol.processor.batch.default.input] - } -} - -otelcol.processor.batch "default" { - output { - traces = [otelcol.exporter.jaeger.default.input] - } -} - -otelcol.exporter.jaeger "default" { - client { - endpoint = "jaeger:14250" - tls { - insecure = true - insecure_skip_verify = true - } - } -} -``` diff --git a/docs/sources/flow/release-notes.md b/docs/sources/flow/release-notes.md index 8d4ba736dce3..f45b5d3291f7 100644 --- a/docs/sources/flow/release-notes.md +++ b/docs/sources/flow/release-notes.md @@ -28,6 +28,13 @@ Other release notes for the different Grafana Agent variants are contained on se [release-notes-operator]: {{< relref "../operator/release-notes.md" >}} {{% /admonition %}} +## v0.38 + +### Breaking change: `otelcol.exporter.jaeger` component removed + +The deprecated `otelcol.exporter.jaeger` component has been removed. To send +traces to Jaeger, use `otelcol.exporter.otlp` and a version of Jaeger that +supports OTLP. ## v0.37 @@ -38,15 +45,15 @@ If you use the Loki processing stage in your Agent configuration, you must renam Old configuration example: ```river -stage.non_indexed_labels { - values = {"app" = ""} +stage.non_indexed_labels { + values = {"app" = ""} } ``` New configuration example: ```river -stage.structured_metadata { - values = {"app" = ""} +stage.structured_metadata { + values = {"app" = ""} } ``` @@ -69,14 +76,14 @@ needs a label. Old configuration example: -```river -prometheus.exporter.unix { /* ... */ } +```river +prometheus.exporter.unix { /* ... */ } ``` New configuration example: -```river -prometheus.exporter.unix "example" { /* ... */ } +```river +prometheus.exporter.unix "example" { /* ... */ } ``` ## v0.36 @@ -116,11 +123,11 @@ How to migrate: format = "" } } - ``` + ``` where the `` is the appropriate compression format - see [`loki.source.file` documentation][loki-source-file-docs] for details. - + [loki-source-file-docs]: {{< relref "./reference/components/loki.source.file.md" >}} ## v0.35 @@ -288,7 +295,7 @@ prometehus.scrape "example" { ### Breaking change: The algorithm for the "hash" action of `otelcol.processor.attributes` has changed The hash produced when using `action = "hash"` in the `otelcol.processor.attributes` flow component is now using the more secure SHA-256 algorithm. -The change was made in PR [#22831](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22831) of opentelemetry-collector-contrib. +The change was made in PR [#22831](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22831) of opentelemetry-collector-contrib. ### Breaking change: `otelcol.exporter.loki` now includes instrumentation scope in its output @@ -316,16 +323,16 @@ Additional `instrumentation_scope` information will be added to the OTLP log sig ### Breaking change: `otelcol.extension.jaeger_remote_sampling` removes the `/` HTTP endpoint The `/` HTTP endpoint was the same as the `/sampling` endpoint. The `/sampling` endpoint is still functional. -The change was made in PR [#18070](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/18070) of opentelemetry-collector-contrib. +The change was made in PR [#18070](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/18070) of opentelemetry-collector-contrib. ### Breaking change: The `remote_sampling` block has been removed from `otelcol.receiver.jaeger` -The `remote_sampling` block in `otelcol.receiver.jaeger` has been an undocumented no-op configuration for some time, and has now been removed. +The `remote_sampling` block in `otelcol.receiver.jaeger` has been an undocumented no-op configuration for some time, and has now been removed. Customers are advised to use `otelcol.extension.jaeger_remote_sampling` instead. ### Deprecation: `otelcol.exporter.jaeger` has been deprecated and will be removed in Agent v0.38.0. -This is because Jaeger supports OTLP directly and OpenTelemetry Collector is also removing its +This is because Jaeger supports OTLP directly and OpenTelemetry Collector is also removing its [Jaeger receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/jaegerexporter). ## v0.34 diff --git a/docs/sources/static/configuration/traces-config.md b/docs/sources/static/configuration/traces-config.md index 2ed6315d7fb1..dbd27dc34245 100644 --- a/docs/sources/static/configuration/traces-config.md +++ b/docs/sources/static/configuration/traces-config.md @@ -66,9 +66,9 @@ remote_write: [ protocol: | default = "grpc" | supported = "grpc", "http" ] # Controls what format to use when exporting traces, in combination with protocol. - # protocol/format supported combinations are grpc/otlp, http/otlp and grpc/jaeger + # protocol/format supported combinations are grpc/otlp and http/otlp. # Only grpc/otlp is supported in Grafana Cloud. - [ format: | default = "otlp" | supported = "otlp", "jaeger" ] + [ format: | default = "otlp" | supported = "otlp" ] # Controls whether or not TLS is required. See https://godoc.org/google.golang.org/grpc#WithInsecure [ insecure: | default = false ] @@ -323,11 +323,11 @@ load_balancing: [ port: | default = 4317 ] # Resolver interval [ interval: | default = 5s ] - # Resolver timeout + # Resolver timeout [ timeout: | default = 1s ] # routing_key can be either "traceID" or "service": - # * "service": exports spans based on their service name. + # * "service": exports spans based on their service name. # * "traceID": exports spans based on their traceID. [ routing_key: | default = "traceID" ] @@ -415,9 +415,9 @@ service_graphs: # jaeger_remote_sampling configures one or more jaeger remote sampling extensions. # For more details about the configuration please consult the OpenTelemetry documentation: # https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.85.0/extension/jaegerremotesampling -# +# # Example config: -# +# # jaeger_remote_sampling: # - source: # remote: @@ -427,7 +427,7 @@ service_graphs: # - source: # reload_interval: 1s # file: /etc/otelcol/sampling_strategies.json -# +# jaeger_remote_sampling: [ - ... ] ``` diff --git a/docs/sources/static/release-notes.md b/docs/sources/static/release-notes.md index f78df5ccde06..f22381e48442 100644 --- a/docs/sources/static/release-notes.md +++ b/docs/sources/static/release-notes.md @@ -15,7 +15,7 @@ The release notes provide information about deprecations and breaking changes in For a complete list of changes to Grafana Agent, with links to pull requests and related issues when available, refer to the [Changelog](https://github.com/grafana/agent/blob/main/CHANGELOG.md). -> **Note:** These release notes are specific to Grafana Agent static mode. +> **Note:** These release notes are specific to Grafana Agent static mode. > Other release notes for the different Grafana Agent variants are contained on separate pages: > > * [Static mode Kubernetes operator release notes][release-notes-operator] @@ -32,6 +32,14 @@ For a complete list of changes to Grafana Agent, with links to pull requests and [Modules]: "/docs/grafana-cloud/ -> /docs/agent//flow/concepts/modules" {{% /docs/reference %}} +## v0.38 + +### Breaking change: support for exporting Jaeger traces removed + +The deprecated support for exporting Jaeger-formatted traces has been removed. +To send traces to Jaeger, export OTLP-formatted data to a version of Jaeger +that supports OTLP. + ## v0.37 ### Breaking change: The default value of `retry_on_http_429` is overriden to `true` for the `queue_config` in `remote_write` in `metrics` config. @@ -77,9 +85,9 @@ New configuration example: ### Breaking change: Jaeger remote sampling no longer configurable using the Jaeger receiver -Jaeger remote sampling used to be configured using the Jaeger receiver configuration. This receiver was updated to a new version, where support for remote sampling in the receiver was removed. +Jaeger remote sampling used to be configured using the Jaeger receiver configuration. This receiver was updated to a new version, where support for remote sampling in the receiver was removed. -Jaeger remote sampling is available as a separate configuration field starting in v0.35.3. +Jaeger remote sampling is available as a separate configuration field starting in v0.35.3. Old configuration example: @@ -104,7 +112,7 @@ jaeger_remote_sampling: ### Breaking change: `auth` and `version` attributes from `walk_params` block of SNMP integration have been removed -The SNMP integrations (both v1 and v2) wrap a new version of SNMP exporter which introduces a new configuration file format. +The SNMP integrations (both v1 and v2) wrap a new version of SNMP exporter which introduces a new configuration file format. This new format separates the walk and metric mappings from the connection and authentication settings. This allows for easier configuration of different auth params without having to duplicate the full walk and metric mapping. diff --git a/go.mod b/go.mod index ce7abbae2856..8aa5f697740f 100644 --- a/go.mod +++ b/go.mod @@ -103,7 +103,6 @@ require ( github.com/oliver006/redis_exporter v1.54.0 github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.85.0 github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.85.0 - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.85.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.85.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.85.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.85.0 @@ -530,7 +529,7 @@ require ( github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/prometheus-community/go-runit v0.1.0 // indirect github.com/prometheus/alertmanager v0.26.0 // indirect - github.com/prometheus/common/sigv4 v0.1.0 // indirect + github.com/prometheus/common/sigv4 v0.1.0 github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remeh/sizedwaitgroup v1.0.0 // indirect diff --git a/go.sum b/go.sum index 13fba5d7d3b5..98f051f2ff5f 100644 --- a/go.sum +++ b/go.sum @@ -1737,8 +1737,6 @@ github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraph github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.85.0/go.mod h1:CA1v4fzjPVIu/YEDD9Q6FppAGhZGBBxQ+MKAvMERd0o= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.85.0 h1:r75lKRDTUz+qCMO5Bghe1o6Snef7Vov55ycQChB/vps= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.85.0/go.mod h1:enlrQwrV86jYc8w5rCrvJkXBjZqPUyexs53pFY7YjXo= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.85.0 h1:NyqJDAgm3VC1UNrTW0gv2auQoTlaCEcit5c0On0oYG4= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.85.0/go.mod h1:F8TX5dXc8VcF789x8UAu1fIWta16sGZMxhfGLNes+L8= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.85.0 h1:zCFV4nSdHziunsWYB/Zwsy2C4W88KlACyENQyjLZHw8= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.85.0/go.mod h1:ADyJg6g2zJ3t6FMGOdw0PjmFhZhDxNT2QVFdt6ZFl5k= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.85.0 h1:qBUujYIkqkctwNkmnAF8ajbVN357DQNbOPp6VAe4ldE= diff --git a/pkg/traces/config.go b/pkg/traces/config.go index 7a36ac45705c..dbd6e28a9a44 100644 --- a/pkg/traces/config.go +++ b/pkg/traces/config.go @@ -13,7 +13,6 @@ import ( promsdconsumer "github.com/grafana/agent/pkg/traces/promsdprocessor/consumer" "github.com/mitchellh/mapstructure" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling" @@ -899,7 +898,6 @@ func tracingFactories() (otelcol.Factories, error) { exporters, err := otelexporter.MakeFactoryMap( otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), - jaegerexporter.NewFactory(), loadbalancingexporter.NewFactory(), prometheusexporter.NewFactory(), remotewriteexporter.NewFactory(), diff --git a/pkg/traces/config_test.go b/pkg/traces/config_test.go index 6a123cb3f329..89157f809ba7 100644 --- a/pkg/traces/config_test.go +++ b/pkg/traces/config_test.go @@ -1027,130 +1027,6 @@ service: exporters: ["otlp/0"] processors: ["service_graphs"] receivers: ["push_receiver", "jaeger"] -`, - }, - { - name: "jaeger exporter", - cfg: ` -receivers: - jaeger: - protocols: - grpc: -remote_write: - - insecure: true - format: jaeger - endpoint: example.com:12345 -`, - expectedConfig: ` -receivers: - push_receiver: {} - jaeger: - protocols: - grpc: -exporters: - jaeger/0: - endpoint: example.com:12345 - compression: gzip - tls: - insecure: true - retry_on_failure: - max_elapsed_time: 60s -processors: {} -extensions: {} -service: - pipelines: - traces: - exporters: ["jaeger/0"] - processors: [] - receivers: ["push_receiver", "jaeger"] -`, - }, - { - name: "jaeger exporter with basic auth", - cfg: ` -receivers: - jaeger: - protocols: - grpc: -remote_write: - - insecure: true - format: jaeger - protocol: grpc - basic_auth: - username: test - password_file: ` + passwordFile.Name() + ` - endpoint: example.com:12345 -`, - expectedConfig: ` -receivers: - push_receiver: {} - jaeger: - protocols: - grpc: -exporters: - jaeger/0: - endpoint: example.com:12345 - compression: gzip - tls: - insecure: true - headers: - authorization: Basic dGVzdDpwYXNzd29yZF9pbl9maWxl - retry_on_failure: - max_elapsed_time: 60s -processors: {} -extensions: {} -service: - pipelines: - traces: - exporters: ["jaeger/0"] - processors: [] - receivers: ["push_receiver", "jaeger"] -`, - }, - { - name: "two exporters different format", - cfg: ` -receivers: - jaeger: - protocols: - grpc: -remote_write: - - insecure: true - format: jaeger - endpoint: example.com:12345 - - insecure: true - format: otlp - endpoint: something.com:123 -`, - expectedConfig: ` -receivers: - push_receiver: {} - jaeger: - protocols: - grpc: -exporters: - jaeger/0: - endpoint: example.com:12345 - compression: gzip - tls: - insecure: true - retry_on_failure: - max_elapsed_time: 60s - otlp/1: - endpoint: something.com:123 - compression: gzip - tls: - insecure: true - retry_on_failure: - max_elapsed_time: 60s -processors: {} -extensions: {} -service: - pipelines: - traces: - exporters: ["jaeger/0", "otlp/1"] - processors: [] - receivers: ["push_receiver", "jaeger"] `, }, { diff --git a/pkg/traces/promsdprocessor/consumer/consumer.go b/pkg/traces/promsdprocessor/consumer/consumer.go index 79df98fe7aa1..f24e5f9fe159 100644 --- a/pkg/traces/promsdprocessor/consumer/consumer.go +++ b/pkg/traces/promsdprocessor/consumer/consumer.go @@ -160,17 +160,17 @@ func (c *Consumer) processAttributes(ctx context.Context, attrs pcommon.Map) { return } - for k, v := range labels { + for _, label := range labels.Labels() { switch c.opts.OperationType { case OperationTypeUpsert: - attrs.PutStr(k, v) + attrs.PutStr(label.Name, label.Value) case OperationTypeInsert: - if _, ok := attrs.Get(k); !ok { - attrs.PutStr(k, v) + if _, ok := attrs.Get(label.Name); !ok { + attrs.PutStr(label.Name, label.Value) } case OperationTypeUpdate: - if toVal, ok := attrs.Get(k); ok { - toVal.SetStr(v) + if toVal, ok := attrs.Get(label.Name); ok { + toVal.SetStr(label.Value) } } }