Tempo

  • By Canonical Observability
Channel Revision Published Runs on
latest/stable 51 28 Jun 2024
Ubuntu 22.04 Ubuntu 20.04
latest/stable 9 16 Feb 2024
Ubuntu 22.04 Ubuntu 20.04
latest/candidate 68 28 Jun 2024
Ubuntu 22.04 Ubuntu 20.04
latest/candidate 9 12 Dec 2023
Ubuntu 22.04 Ubuntu 20.04
latest/beta 71 28 Jun 2024
Ubuntu 22.04 Ubuntu 20.04
latest/beta 9 12 Dec 2023
Ubuntu 22.04 Ubuntu 20.04
latest/edge 71 27 Jun 2024
Ubuntu 22.04 Ubuntu 20.04
latest/edge 9 31 Jul 2023
Ubuntu 22.04 Ubuntu 20.04
juju deploy tempo-k8s --channel edge
Show information

Platform:

Traces in charm tracing

When we refer to charm tracing, it is concerned with pushing traces of the charm execution flow not with the workload flow itself.

With that, there is an analogy between traces and charm events (hooks) that occur during a charm’s life cycle. With every hook fired, charm execution begins and that starts a new trace indicating the start of an execution flow with a parent span called charm exec.

Spans in charm tracing

There are several occasions where a span will be created under a trace during a charm execution:

  • when a juju event is fired, a child span is created whose parent is the charm exec span.
  • when an ops event is fired, a child span is created whose parent is the charm exec span.
  • when a non-dunder charm class method gets called as part of the charm execution, a child span is created whose parent is either a juju event span or an ops event span.
  • when a non-dunder extra class method gets called as part of the charm execution, a child span is created whose parent is either a juju event span or an ops event span.

Tracing a trace

This section assumes prior knowledge on a charm’s lifecycle and control flow.

Assuming you have a charm instrumented for sending traces to a tempo backend:

When the periodical update_status hook fires, by the end of your charm execution for this hook, an example execution flow can look like the below:

charm_exec.drawio (1)

you’ll have a trace created in your tempo backend with a similar structure to the below:


Help improve this document in the forum (guidelines). Last updated 2 months ago.