Skip to content
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

[exporter/datadog] Remove faulty dependency #12962

Merged

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Aug 4, 2022

Description:

Bump to DataDog/datadog-agent@2fec6ab to include DataDog/datadog-agent#12992

Link to tracking Issue: Fixes #12934

@mx-psi mx-psi added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Aug 4, 2022
@mx-psi mx-psi marked this pull request as ready for review August 4, 2022 15:38
@mx-psi mx-psi requested review from a team and djaglowski August 4, 2022 15:38
@mx-psi mx-psi marked this pull request as draft August 4, 2022 15:55
@mx-psi
Copy link
Member Author

mx-psi commented Aug 4, 2022

@gbbr I get

2022-08-04T15:49:20.6952012Z ##[error].\traces_exporter.go:62:2: undefined: info.Version

which seems related to DataDog/datadog-agent/pull/12849. Can you have a look?

@gbbr
Copy link
Member

gbbr commented Aug 4, 2022

Ah, yes. Luckily @ajgajg1134 fixed this hack! You have to make this change:

diff --git a/exporter/datadogexporter/traces_exporter.go b/exporter/datadogexporter/traces_exporter.go
index a9a9f3ae8..2ffbb3c3f 100644
--- a/exporter/datadogexporter/traces_exporter.go
+++ b/exporter/datadogexporter/traces_exporter.go
@@ -23,7 +23,6 @@ import (
 
 	"github.com/DataDog/datadog-agent/pkg/trace/agent"
 	traceconfig "github.com/DataDog/datadog-agent/pkg/trace/config"
-	traceinfo "github.com/DataDog/datadog-agent/pkg/trace/info"
 	tracelog "github.com/DataDog/datadog-agent/pkg/trace/log"
 	"go.opentelemetry.io/collector/component"
 	"go.opentelemetry.io/collector/consumer"
@@ -59,7 +58,6 @@ func newTracesExporter(ctx context.Context, params component.ExporterCreateSetti
 	if err := utils.ValidateAPIKey(params.Logger, client); err != nil && cfg.API.FailOnInvalidKey {
 		return nil, err
 	}
-	traceinfo.Version = fmt.Sprintf("datadogexporter-%s-%s", params.BuildInfo.Command, params.BuildInfo.Version)
 	acfg := traceconfig.New()
 	src, err := sourceProvider.Source(ctx)
 	if err != nil {
@@ -74,6 +72,7 @@ func newTracesExporter(ctx context.Context, params component.ExporterCreateSetti
 	acfg.Endpoints[0].APIKey = cfg.API.Key
 	acfg.Ignore["resource"] = cfg.Traces.IgnoreResources
 	acfg.ReceiverPort = 0 // disable HTTP receiver
+	acfg.AgentVersion = fmt.Sprintf("datadogexporter-%s-%s", params.BuildInfo.Command, params.BuildInfo.Version)
 	if v := cfg.Traces.flushInterval; v > 0 {
 		acfg.TraceWriter.FlushPeriodSeconds = v
 	}

Co-authored-by: Gabriel Aszalos <gabriel.aszalos@gmail.com>
@mx-psi mx-psi marked this pull request as ready for review August 4, 2022 16:17
@bogdandrutu bogdandrutu merged commit c8caa9e into open-telemetry:main Aug 4, 2022
@mx-psi mx-psi deleted the mx-psi/update-ddog-exporter branch November 2, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dependencies on github.com/outcaste-io/ristretto v0.2.0 are failing
4 participants