Skip to content

Commit 3147431

Browse files
committed
chore: add telemetry item for instrumentation config id
When enabling library injection remotely, we'd like to see which services have been instrumented as a result. To do this we are proposing to submit the configuration ID that was used to instrument the service.
1 parent f792515 commit 3147431

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ddtrace/internal/telemetry/writer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ def _app_started_event(self, register_app_shutdown=True):
420420
if register_app_shutdown:
421421
atexit.register(self.app_shutdown)
422422

423+
package_source_entry = ["instrumentation_config_id", "", "default"]
424+
if "DD_INSTRUMENTATION_CONFIG_ID" in os.environ:
425+
package_source_entry[1] = os.environ["DD_INSTRUMENTATION_CONFIG_ID"]
426+
package_source_entry[2] = "environment"
427+
423428
self.add_configurations(
424429
[
425430
self._telemetry_entry("_trace_enabled"),
@@ -432,6 +437,7 @@ def _app_started_event(self, register_app_shutdown=True):
432437
self._telemetry_entry("trace_http_header_tags"),
433438
self._telemetry_entry("tags"),
434439
self._telemetry_entry("_tracing_enabled"),
440+
package_source_entry,
435441
(TELEMETRY_STARTUP_LOGS_ENABLED, config._startup_logs_enabled, "unknown"),
436442
(TELEMETRY_DYNAMIC_INSTRUMENTATION_ENABLED, di_config.enabled, "unknown"),
437443
(TELEMETRY_EXCEPTION_DEBUGGING_ENABLED, ed_config.enabled, "unknown"),

0 commit comments

Comments
 (0)