Observability
Self-hostedThe self-hosted version of the application supports OpenTelemetry for observability to ship signals to an observability platform, such as Prometheus, Elastic, Datadog, and others.
The following signals are supported:
- Logs
- Metrics
- Traces
You can enable and configure OpenTelemetry by setting environment variables:
Environment Variable | Value | Description |
---|---|---|
OTEL_JAVAAGENT_ENABLED | true | Enable OpenTelemetry |
OTEL_EXPORTER_OTLP_ENDPOINT | https://ENDPOINT_URL | The endpoint URL for the OTLP exporter |
OTEL_EXPORTER_OTLP_HEADERS | Authorization=Bearer BEARER_TOKEN | Headers for the OTLP exporter, including authorization |
OTEL_RESOURCE_ATTRIBUTES | service.name=datacontract-manager,deployment.environment=prod | Attributes for the resource, such as service name, version, and deployment environment |
OTEL_SERVICE_NAME | datacontract-manager | The name of the service |
OTEL_JAVAAGENT_LOGGING | application | The Java agent logging mode. |
OTEL_EXPORTER_OTLP_PROTOCOL | http/protobuf | Protocol used by the OTLP exporter |
OTEL_LOGS_EXPORTER | otlp | otlp to enable (default) or none to disable logs exporter |
OTEL_METRICS_EXPORTER | otlp | otlp to enable (default) or none to disable metrics exporter |
OTEL_TRACES_EXPORTER | otlp | otlp to enable (default) or none to disable traces exporter |
OTEL_INSTRUMENTATION_MICROMETER_ENABLED | true | Enable this to export application metrics. |
You can use the official OpenTelemetry documentation to learn more about the configuration options: https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/