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

Only instrument fs with parent span #817

Merged
merged 1 commit into from
Dec 30, 2022
Merged

Conversation

unflxw
Copy link
Contributor

@unflxw unflxw commented Dec 27, 2022

Fixes #813.

After implementing the OTel PR with the requireParentSpan configuration option, while ungarbling the README file in order to document it, I realised that there was an easy way to do this already available within the instrumentation. 🤦

This is that easy way. It might be good to replace this with requireParentSpan once/if it's merged, but it's merely a nice-to-have.

@unflxw unflxw added the chore label Dec 27, 2022
@unflxw unflxw self-assigned this Dec 27, 2022
@backlog-helper
Copy link

backlog-helper bot commented Dec 27, 2022

✔️ All good!

New issue guide | Backlog management | Rules | Feedback

@unflxw unflxw force-pushed the fs-create-hook-parent-span branch from af900e2 to 3cb4355 Compare December 27, 2022 17:55
Copy link
Member

@luismiramirez luismiramirez left a comment

Choose a reason for hiding this comment

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

LGTM after adding a changeset

To avoid having spans consisting entirely of an `fs` invocation,
such as those originating from reading files on boot, only instrument
`fs` calls if there already is a root span.
@unflxw unflxw force-pushed the fs-create-hook-parent-span branch from 3cb4355 to 7637610 Compare December 29, 2022 11:40
@unflxw unflxw merged commit 6ee5245 into main Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement requireParentSpan for fs instrumentation
3 participants