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) }