[exporter/datadog] Remove faulty dependency#12962
Merged
bogdandrutu merged 2 commits intoAug 4, 2022
Merged
Conversation
Member
Author
|
@gbbr I get which seems related to DataDog/datadog-agent/pull/12849. Can you have a look? |
Member
|
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>
bogdandrutu
approved these changes
Aug 4, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description:
Bump to DataDog/datadog-agent@2fec6ab to include DataDog/datadog-agent#12992
Link to tracking Issue: Fixes #12934