Telemetry Trait
The Telemetry trait can be used to automatically publish tracing information to an OTLP compatible collector.
The trait is able to automatically discover the telemetry OTLP endpoint available in the namespace (supports Jaerger in version 1.35+).
The Telemetry trait is disabled by default.
The Telemetry trait can’t be enabled at the same time as the Tracing trait. |
This trait is available in the following profiles: Kubernetes, Knative, OpenShift.
Configuration
Trait properties can be specified when running any integration with the CLI:
$ kamel run --trait telemetry.[key]=[value] --trait telemetry.[key2]=[value2] integration.groovy
The following configuration options are available:
Property | Type | Description |
---|---|---|
|
| Can be used to enable or disable a trait. All traits share this common property. |
|
| Enables automatic configuration of the trait, including automatic discovery of the telemetry endpoint. |
|
| The name of the service that publishes telemetry data (defaults to the integration name) |
|
| The target endpoint of the Telemetry service (automatically discovered by default) |
|
| The sampler of the telemetry used for tracing (default "on") |
|
| The sampler ratio of the telemetry used for tracing |
|
| The sampler of the telemetry used for tracing is parent based (default "true") |
Examples
-
To activate tracing to a deployed OTLP API Jaeger through discovery:
$ kamel run -t telemetry.enable=true ...
-
To define a specific deployed OTLP gRPC reciever:
$ kamel run -t telemetry.enable=true -t telemetry.endpoint=http://instance-collector:4317 ...
-
To define another sampler service name:
$ kamel run -t telemetry.enable=true -t telemetry.service-name=tracer_myintegration ...
-
To use a ratio sampler with a sampling ratio of 1 to every 1,000 :
$ kamel run -t telemetry.enable=true -t telemetry.sampler=ratio -t telemetry.sampler-ratio=0.001 ...