Collecting Telemetry via OpenTelemetry
If you want to gain more insight into how the dependency-management-data tooling run against your organisation's data, you can take advantage of the inbuilt telemetry functionality, via OpenTelemetry (aka OTel).
Telemetry is for usage inside your organisation, only
The telemetry data collected by dependency-management-data is purely for the usage of your organisation, and is not something that will be centrally collected by the Open Source project.
This is not intended to be used outside of your organisation, as it will (out-of-the-box) expose sensitive data such as filenames.
Prerequisites
Before you can export the data, you will need somewhere to export the data to.
For instance, using the local Docker image for Jaeger is a good option for local testing, or you may want to export the data to Elastic, Honeycomb, or another vendor.
Each vendor or source for exporting the data will require a different means to configure the export, usually with the OTEL_EXPORTER_OTLP_PROTOCOL
, OTEL_EXPORTER_OTLP_ENDPOINT
and OTEL_EXPORTER_OTLP_HEADERS
environment variables.
Please consult the documentation for your observability vendor/tooling in terms of how to configure the data exports.
Environment variables
It is currently only possible to configure the OpenTelemetry export via environment variable.
DMD respects the OpenTelemetry SDK's inbuilt environment variables for configuration.
For instance, to export to Honeycomb:
# set them one-time, for instance at the start of a CI run
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.honeycomb.io"
export OTEL_EXPORTER_OTLP_HEADERS="x-honeycomb-team=..."
# then, run DMD as usual
./dmd db init --db dmd.db
This will then start to produce data to Honeycomb that can then be queried.