tempo-k8s docs - tracing protocols reference

Tracing Protocols

By design, Tempo can ingest common open source tracing protocols. These protocols include:

  • "zipkin"
  • "otlp_grpc"
  • "otlp_http"
  • "jaeger_thrift_http"
  • "jaeger_grpc"

For a full list of receivers supported by upstream Tempo, see protocols.

Send traces with desired protocols

When integrating your charmed application with tempo-k8s to send the traces to Tempo (e.g: integrating over tracing), you can specify, as a list, the tracing protocols you want to send traces with like the example below:

In Kubernetes charms

from charms.tempo_coordinator_k8s.v0.tracing import TracingEndpointRequirer

class FooCharm:
    def __init__(self, *args):
        super().__init__(*args, **kwargs)
        ...
        self.tracing = TracingEndpointRequirer(self, 
            protocols=["otlp_http", "otlp_grpc", "jaeger_thrift_http"])
        ...

The provider will enable receivers for these and only these protocols, so be sure to enable all protocols the charm or its workload are going to need.

However, in charm library charms.tempo_k8s.v1.charm_tracing, which is used to instrument the charm, the traces need to be sent with otlp_http protocol.

In machine charms

Machine charms are using the cos_agent charm library to send traces to grafana-agent charm that relays them further.

See more on cos_agent: cos_agent reference

from charms.grafana_agent.v0.cos_agent import CosAgentProvider

class FooCharm:
    def __init__(self, *args):
        super().__init__(*args, **kwargs)
        ...
        self.agent = CosAgentProvider(self,
            ... # see cos-agent for more reference
            tracing_protocols=["otlp_http", "otlp_grpc", "jaeger_thrift_http"])
        ...

Last updated a month ago.