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

Add ability for logging to record tracing span log entries #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LloydW93
Copy link
Member

In large environments with separate logging and tracing pipelines, identifying pertinent log information for a trace can involve searching in an entirely different store, which may be subject to its own sampling and rate limiting. For these situations, the log lines generate specifically whilst the traced action is executed are particularly high value in providing additional context.

This change adds trace emission options for the logging module, which allow enabling emitting logs from traces at a separately specified verbosity level, which can be changed the same was as we can with set_verbosity.

To fully specify log fields, add_span_log_fn is added as a macro to the tracing module, at a cost of losing the full abstraction over rustracing.

Fixes #58

@LloydW93 LloydW93 marked this pull request as draft July 30, 2024 16:34
@LloydW93 LloydW93 force-pushed the trace-logging branch 3 times, most recently from 12e5b56 to 00a2adf Compare August 1, 2024 18:14
@LloydW93 LloydW93 marked this pull request as ready for review August 1, 2024 18:17
In large environments with separate logging and tracing pipelines,
identifying pertinent log information for a trace can involve
searching in an entirely different store, which may be subject
to its own sampling and rate limiting. For these situations, the
log lines generate specifically whilst the traced action is
executed are particularly high value in providing additional context.

This change adds trace emission options for the logging module,
which allow enabling emitting logs from traces at a separately
specified verbosity level, which can be changed the same was as
we can with set_verbosity.

To fully specify log fields, add_span_log_fields is updated to
additionally be able to accept an iterable, similar to
`add_span_tags`.
@inikulin
Copy link
Collaborator

inikulin commented Aug 5, 2024

@LloydW93 I'm not sure I understand the motivation behind #58 (see comment there) and what this PR tries to do

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.

Add option to collect log lines emitted in traced contexts in span logs
2 participants