Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Charm logging tracing integration #405

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

PietroPasotti
Copy link
Contributor

@PietroPasotti PietroPasotti commented May 28, 2024

based upon #392

Logs --> traces

If a charm is using charm_tracing and charm_logging (and both are active and healthy), we should be able to link traces and logs generated by each charm execution.

This PR links logs to traces by:

  • tagging all logs with the trace ID obtained from the context
  • configuring the loki datasource to link each log tagged with a trace ID to the appropriate tempo trace in grafana

Open questions/challenges

  • the charm_logging decorator needs to be applied before the charm_tracing one, otherwise logging will be unaware of the tracing context and fail to acknowledge the root span id.

Resources:
https://grafana.com/docs/grafana/latest/datasources/loki/#provision-the-data-source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants