Instrumenting your code in CI/Staging or the terminal
Last updated
Last updated
Connecting Digma to your CI environment requires deploying Digma centrally in your org.
The most straightforward way to instrument your application is simply to download the OTEL agent and Digma Extension files and then set some environment variables and system properties so that they can instrument the Java process.
Start by creating an environment using the Digma Observability panel. Give the environment a meaningful name and select the CI/Prod environment type.
You can use the below or similar logic to download the OTEL agent and set the environment variables to instrument the application.
Substitute the following values:
Replace [
DIGMA_COLLECTOR_URL]
with your Digma Collector-API address. If you're running Digma locally, this would be http://localhost:5050 by default
Make sure to substitute [SERVICE_NAME]
with your application name:
Substitute the [ENVIRONMENT_NAME]
value based on the environment identifier in Digma. To retrieve the environment identifier see the instructions on the environment page.
If you would like to use HTTP rather than GRPC as the collector protocol, simply change the following argument above:-Dotel.exporter.otlp.protocol=http