Skip to content

Commit 9dcd0be

Browse files
songy23Fiery-Fenix
authored andcommitted
[chore][exporter/datadog] update deps and fix breaking changes (open-telemetry#39520)
#### Description preemptively update 2 deps and fix the breaking changes
1 parent 38dfe5a commit 9dcd0be

File tree

8 files changed

+67
-53
lines changed

8 files changed

+67
-53
lines changed

connector/datadogconnector/factory.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ func createDefaultConfig() component.Config {
6060
// defines the consumer type of the connector
6161
// we want to consume traces and export metrics therefore define nextConsumer as metrics, consumer is the next component in the pipeline
6262
func createTracesToMetricsConnector(_ context.Context, params connector.Settings, cfg component.Config, nextConsumer consumer.Metrics) (c connector.Traces, err error) {
63-
metricsClient := metricsclient.InitializeMetricClient(params.MeterProvider, metricsclient.ConnectorSourceTag)
63+
metricsClient, err := metricsclient.InitializeMetricClient(params.MeterProvider, metricsclient.ConnectorSourceTag)
64+
if err != nil {
65+
return nil, err
66+
}
6467
if NativeIngestFeatureGate.IsEnabled() {
6568
params.Logger.Info("Datadog connector using the native OTel API to ingest OTel spans and produce APM stats. To revert to the legacy processing pipeline, disable the feature gate", zap.String("feature gate", nativeIngestFeatureGateName))
6669
c, err = newTraceToMetricConnectorNative(params.TelemetrySettings, cfg, nextConsumer, metricsClient)

connector/datadogconnector/go.mod

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/datad
33
go 1.23.0
44

55
require (
6-
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.66.0-devel.0.20250407180930-ebfcfa2817ce
6+
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.67.0-devel.0.20250421161610-e24fa4531cf3
77
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/statsprocessor v0.66.0-devel.0.20250407180930-ebfcfa2817ce
88
github.com/DataDog/datadog-agent/pkg/obfuscate v0.66.0-devel.0.20250407180930-ebfcfa2817ce
99
github.com/DataDog/datadog-agent/pkg/proto v0.66.0-devel.0.20250407180930-ebfcfa2817ce
@@ -43,7 +43,7 @@ require (
4343

4444
require (
4545
cloud.google.com/go/compute/metadata v0.6.0 // indirect
46-
github.com/DataDog/agent-payload/v5 v5.0.146 // indirect
46+
github.com/DataDog/agent-payload/v5 v5.0.147 // indirect
4747
github.com/DataDog/datadog-agent/comp/core/config v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
4848
github.com/DataDog/datadog-agent/comp/core/flare/builder v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
4949
github.com/DataDog/datadog-agent/comp/core/flare/types v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
@@ -60,7 +60,7 @@ require (
6060
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
6161
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
6262
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
63-
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/serializerexporter v0.66.0-devel.0.20250408165132-d86502cae975 // indirect
63+
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/serializerexporter v0.67.0-devel.0.20250421161610-e24fa4531cf3 // indirect
6464
github.com/DataDog/datadog-agent/comp/serializer/logscompression v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
6565
github.com/DataDog/datadog-agent/comp/serializer/metricscompression v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
6666
github.com/DataDog/datadog-agent/comp/trace/compression/def v0.66.0-devel.0.20250407180930-ebfcfa2817ce // indirect
@@ -223,7 +223,7 @@ require (
223223
github.com/mitchellh/reflectwalk v1.0.2 // indirect
224224
github.com/moby/sys/userns v0.1.0 // indirect
225225
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
226-
github.com/modern-go/reflect2 v1.0.2 // indirect
226+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
227227
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
228228
github.com/mostynb/go-grpc-compression v1.2.3 // indirect
229229
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
@@ -341,7 +341,7 @@ require (
341341
go.uber.org/dig v1.18.1 // indirect
342342
go.uber.org/fx v1.23.0 // indirect
343343
go.uber.org/multierr v1.11.0 // indirect
344-
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
344+
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
345345
golang.org/x/net v0.39.0 // indirect
346346
golang.org/x/oauth2 v0.28.0 // indirect
347347
golang.org/x/sync v0.13.0 // indirect

connector/datadogconnector/go.sum

+12-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exporter/datadogexporter/factory.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ func (f *factory) StopReporter() {
171171
}
172172

173173
func (f *factory) TraceAgent(ctx context.Context, wg *sync.WaitGroup, params exporter.Settings, cfg *datadogconfig.Config, sourceProvider source.Provider, attrsTranslator *attributes.Translator) (*agent.Agent, error) {
174-
agnt, err := newTraceAgent(ctx, params, cfg, sourceProvider, metricsclient.InitializeMetricClient(params.MeterProvider, metricsclient.ExporterSourceTag), attrsTranslator)
174+
mc, err := metricsclient.InitializeMetricClient(params.MeterProvider, metricsclient.ExporterSourceTag)
175+
if err != nil {
176+
return nil, err
177+
}
178+
agnt, err := newTraceAgent(ctx, params, cfg, sourceProvider, mc, attrsTranslator)
175179
if err != nil {
176180
return nil, err
177181
}
@@ -279,7 +283,11 @@ func (f *factory) createMetricsExporter(
279283
cancel()
280284
return nil, err
281285
}
282-
metricsClient := metricsclient.InitializeMetricClient(set.MeterProvider, metricsclient.ExporterSourceTag)
286+
metricsClient, err := metricsclient.InitializeMetricClient(set.MeterProvider, metricsclient.ExporterSourceTag)
287+
if err != nil {
288+
cancel()
289+
return nil, err
290+
}
283291
timingReporter := timing.New(metricsClient)
284292
statsWriter := writer.NewStatsWriter(acfg, telemetry.NewNoopCollector(), metricsClient, timingReporter)
285293

exporter/datadogexporter/go.mod

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datado
33
go 1.23.0
44

55
require (
6-
github.com/DataDog/agent-payload/v5 v5.0.146
6+
github.com/DataDog/agent-payload/v5 v5.0.147
77
github.com/DataDog/datadog-agent/comp/core/config v0.66.0-devel.0.20250407180930-ebfcfa2817ce
88
github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.66.0-devel.0.20250407180930-ebfcfa2817ce
99
github.com/DataDog/datadog-agent/comp/core/log/def v0.66.0-devel.0.20250407180930-ebfcfa2817ce
1010
github.com/DataDog/datadog-agent/comp/logs/agent/config v0.66.0-devel.0.20250407180930-ebfcfa2817ce
1111
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline v0.66.0-devel.0.20250407180930-ebfcfa2817ce
1212
github.com/DataDog/datadog-agent/comp/otelcol/logsagentpipeline/logsagentpipelineimpl v0.66.0-devel.0.20250407180930-ebfcfa2817ce
1313
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/logsagentexporter v0.66.0-devel.0.20250407180930-ebfcfa2817ce
14-
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.66.0-devel.0.20250407180930-ebfcfa2817ce
14+
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.67.0-devel.0.20250421161610-e24fa4531cf3
1515
github.com/DataDog/datadog-agent/comp/otelcol/otlp/testutil v0.66.0-devel.0.20250407180930-ebfcfa2817ce
1616
github.com/DataDog/datadog-agent/comp/trace/compression/impl-gzip v0.66.0-devel.0.20250407180930-ebfcfa2817ce
1717
github.com/DataDog/datadog-agent/pkg/config/model v0.66.0-devel.0.20250407180930-ebfcfa2817ce
@@ -89,7 +89,7 @@ require (
8989
)
9090

9191
require (
92-
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/serializerexporter v0.66.0-devel.0.20250408165132-d86502cae975
92+
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/exporter/serializerexporter v0.67.0-devel.0.20250421161610-e24fa4531cf3
9393
github.com/DataDog/datadog-agent/comp/serializer/logscompression v0.66.0-devel.0.20250407180930-ebfcfa2817ce
9494
github.com/DataDog/datadog-agent/pkg/config/viperconfig v0.66.0-devel.0.20250407180930-ebfcfa2817ce
9595
github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.124.1
@@ -322,7 +322,7 @@ require (
322322
github.com/moby/docker-image-spec v1.3.1 // indirect
323323
github.com/moby/sys/userns v0.1.0 // indirect
324324
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
325-
github.com/modern-go/reflect2 v1.0.2 // indirect
325+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
326326
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
327327
github.com/mostynb/go-grpc-compression v1.2.3 // indirect
328328
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
@@ -460,15 +460,15 @@ require (
460460
go.uber.org/multierr v1.11.0 // indirect
461461
go.uber.org/zap/exp v0.3.0 // indirect
462462
golang.org/x/crypto v0.37.0 // indirect
463-
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
463+
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
464464
golang.org/x/mod v0.24.0 // indirect
465465
golang.org/x/oauth2 v0.28.0 // indirect
466466
golang.org/x/sync v0.13.0 // indirect
467467
golang.org/x/sys v0.32.0 // indirect
468468
golang.org/x/term v0.31.0 // indirect
469469
golang.org/x/text v0.24.0 // indirect
470470
golang.org/x/time v0.11.0 // indirect
471-
golang.org/x/tools v0.31.0 // indirect
471+
golang.org/x/tools v0.32.0 // indirect
472472
gonum.org/v1/gonum v0.16.0 // indirect
473473
google.golang.org/api v0.226.0 // indirect
474474
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect

0 commit comments

Comments
 (0)