From f7606d98665d7c88178a8caeafbb8ccc47a7036e Mon Sep 17 00:00:00 2001 From: Eliott Bouhana Date: Mon, 17 Feb 2025 13:54:41 +0100 Subject: [PATCH] start telemetry client after appsec started Signed-off-by: Eliott Bouhana --- ddtrace/tracer/tracer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ddtrace/tracer/tracer.go b/ddtrace/tracer/tracer.go index f189d8f8aa..dca2123b20 100644 --- a/ddtrace/tracer/tracer.go +++ b/ddtrace/tracer/tracer.go @@ -186,10 +186,6 @@ func Start(opts ...StartOption) { log.Warn("Remote config startup error: %s", err) } - // start instrumentation telemetry unless it is disabled through the - // DD_INSTRUMENTATION_TELEMETRY_ENABLED env var - startTelemetry(t.config) - // appsec.Start() may use the telemetry client to report activation, so it is // important this happens _AFTER_ startTelemetry() has been called, so the // client is appropriately configured. @@ -198,6 +194,10 @@ func Start(opts ...StartOption) { appsecopts = append(appsecopts, appsecConfig.WithRCConfig(cfg), appsecConfig.WithMetaStructAvailable(t.config.agent.metaStructAvailable)) appsec.Start(appsecopts...) + // start instrumentation telemetry unless it is disabled through the + // DD_INSTRUMENTATION_TELEMETRY_ENABLED env var + startTelemetry(t.config) + if t.config.logStartup { logStartup(t) }