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

fix(sdk-node): register instrumentations early #3502

Merged
merged 12 commits into from
Jan 27, 2023

Conversation

Flarna
Copy link
Member

@Flarna Flarna commented Dec 21, 2022

Which problem is this PR solving?

instrumentations are installed after they are required because SDK startup is async.

Fixes #3146

Short description of the changes

Register instrumentations as first step in start() before it gets async to ensure that modules required during async resource detection get instrumented.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

local

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

Register instrumentations as first step in start() before it gets async to
ensure that modules required during async resource detection get instrumented.
@Flarna Flarna requested a review from a team December 21, 2022 15:06
experimental/CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Merging #3502 (b57ce13) into main (b5ef0e4) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head b57ce13 differs from pull request most recent head e1de971. Consider uploading reports for the commit e1de971 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3502      +/-   ##
==========================================
- Coverage   93.80%   93.79%   -0.02%     
==========================================
  Files         249      249              
  Lines        7640     7640              
  Branches     1589     1589              
==========================================
- Hits         7167     7166       -1     
- Misses        473      474       +1     
Impacted Files Coverage Δ
...imental/packages/opentelemetry-sdk-node/src/sdk.ts 93.54% <100.00%> (ø)
...-trace-base/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️

@Flarna Flarna added bug Something isn't working and removed bug Something isn't working labels Jan 23, 2023
@dyladan dyladan merged commit a90c558 into open-telemetry:main Jan 27, 2023
@Flarna Flarna deleted the sdk-early-instrument branch January 27, 2023 19:01
@dyladan dyladan mentioned this pull request Jan 27, 2023
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.

NodeSDK should register instrumentations earlier
5 participants