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.yaml

The following configuration options are available:

Property Type Description

telemetry.enabled

bool

Can be used to enable or disable a trait. All traits share this common property.

telemetry.auto

bool

Enables automatic configuration of the trait, including automatic discovery of the telemetry endpoint.

telemetry.service-name

string

The name of the service that publishes telemetry data (defaults to the integration name)

telemetry.endpoint

string

The target endpoint of the Telemetry service (automatically discovered by default)

telemetry.sampler

string

The sampler of the telemetry used for tracing (default "on")

telemetry.sampler-ratio

string

The sampler ratio of the telemetry used for tracing

telemetry.sampler-parent-based

bool

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 ...