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

[pino] Omit misleading context when executed in thread-stream worker #127

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

PetrHeinz
Copy link
Member

Fixes #124

Unfortunately, the code is executed inside thread-stream worker and doesn't have access to stack trace or the main file name.

I'm keeping the functionality provided the data can be accessed, it might work in a specific Pino version or with a specific setting. If the stackContextHint is not recognized in stack trace, omit the context data.

Only affects Pino.

Before:

image

After:

image

@PetrHeinz PetrHeinz requested a review from curusarn October 9, 2024 14:47
Copy link
Contributor

@curusarn curusarn left a comment

Choose a reason for hiding this comment

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

Thanks! Odd that it doesn't work. I think I remember the context working with Pino but maybe I'm wrong.

@PetrHeinz PetrHeinz merged commit ab0a429 into master Oct 9, 2024
4 checks passed
@PetrHeinz PetrHeinz deleted the ph/omit-context branch October 9, 2024 14:51
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.

Context is always the @logtail/pino file instead of the calling function
2 participants