open-telemetry / open-telemetry/opentelemetry-python

Is there a way to make loguru automatically print the trace_id in logs like logging does?

Open
#3,615 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request logging
Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

I can print out the trace_id using the default logging, but I can't do it with loguru. Is there a way to make loguru also print out the trace_id?
image

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reproducing the default logging and Loguru trace_id examples shown in the report, then trace the relevant OpenTelemetry Python logging path; done means Loguru output includes the trace_id consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.