Instrumenting your code for tracing
Last updated
Last updated
Digma's main input is your code's OpenTelemetry traces. Depending on your application programming language and frameworks/libraries, you may want to select a different strategy for collecting this data or 'instrumenting' your app code.
If you're not using OpenTelemetry yet, the is a great place to start. In many cases, you won't need to make any modifications to your code to get this data.
Digma also provides additional helpers, guides, and tools to streamline this process. Check out our documentation as an example.
If you're already using an OpenTelemetry Collector, follow the instructions here:Sending Data to Digma using the OTEL Collector. If you're not yet using a collector and want an easier setup you can just use the following environment variable to control the OTLP tracing export and disable logging and metrics export to Digma as they are not supported:
Digma relies on specific OTEL resource attributes to classify the observability data based on the service, the , etc. The way to add these attributes might differ depending on how OTEL is activated. A standard convention is to use the following environment variables:
You also need to tag the observability data based on the Digma Environments. This is done automatically when your code is instrumented by the Digma IDE plugin for relevant languages.