Skip to content

feat: create tracing.SlogSink for storing logs as span events #4962

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

Merged
merged 7 commits into from
Nov 9, 2022

Conversation

deansheather
Copy link
Member

Adds tracing.SlogSink which implements slog.Sink, adding the log entries as events to the span in the context. Skips spans if they are not recording or no-op.

Slog fields are converted to otel attributes in a simplistic way, not all types of fields are recorded.

@deansheather deansheather requested a review from coadler November 8, 2022 22:00
coadler
coadler previously approved these changes Nov 8, 2022
@deansheather deansheather marked this pull request as ready for review November 9, 2022 17:25
@deansheather deansheather requested a review from coadler November 9, 2022 17:29
@deansheather deansheather requested a review from a team as a code owner November 9, 2022 17:31
@deansheather deansheather requested review from code-asher and removed request for a team November 9, 2022 17:31
@deansheather deansheather enabled auto-merge (squash) November 9, 2022 17:32
@deansheather deansheather removed the request for review from code-asher November 9, 2022 17:32
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neato

@deansheather deansheather merged commit ffc24dc into main Nov 9, 2022
@deansheather deansheather deleted the dean/slog-trace-events branch November 9, 2022 18:58
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants