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: enable async hooks manager in node tracer close #226 #232

Merged
merged 4 commits into from
Sep 7, 2019

Conversation

vmarchaud
Copy link
Member

@codecov-io
Copy link

codecov-io commented Aug 30, 2019

Codecov Report

Merging #232 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #232      +/-   ##
==========================================
- Coverage   98.79%   98.74%   -0.05%     
==========================================
  Files          55       55              
  Lines        2161     2155       -6     
  Branches      151      150       -1     
==========================================
- Hits         2135     2128       -7     
- Misses         26       27       +1
Impacted Files Coverage Δ
...ckages/opentelemetry-node-tracer/src/NodeTracer.ts 100% <100%> (ø) ⬆️
.../opentelemetry-node-tracer/test/NodeTracer.test.ts 100% <100%> (ø) ⬆️
...telemetry-node-tracer/src/instrumentation/utils.ts 89.47% <0%> (-6.36%) ⬇️
...metry-node-tracer/src/instrumentation/constants.ts 100% <0%> (ø) ⬆️
...try-node-tracer/test/instrumentation/utils.test.ts 100% <0%> (ø) ⬆️
...e-tracer/test/instrumentation/PluginLoader.test.ts 100% <0%> (ø) ⬆️

Copy link
Member

@OlivierAlbertini OlivierAlbertini left a comment

Choose a reason for hiding this comment

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

LGTM

@mayurkale22
Copy link
Member

Somehow NodeTracer tests are not running, see below snap (Same thing I observed locally) ->
Screen Shot 2019-08-30 at 11 42 50 AM

Any idea?

@OlivierAlbertini
Copy link
Member

OlivierAlbertini commented Aug 30, 2019

Somehow NodeTracer tests are not running, see below snap (Same thing I observed locally) ->

Any idea?

Yeah I got the same weird situation with the http-plugin, it's when you put test files in deeper folders... So if you put NodeTracer.test.ts inside instrumentation folder, it will run. It should also work if you put NodeTracer.test.ts inside a folder (not instrumentation only)

Copy link
Member

@OlivierAlbertini OlivierAlbertini left a comment

Choose a reason for hiding this comment

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

Fix NodeTracer.test.ts file. #233

@mayurkale22
Copy link
Member

Yeah I got the same weird situation with the http-plugin, it's when you put test files in deeper folders... So if you put NodeTracer.test.ts inside instrumentation folder, it will run.

Yes, right. One option is to remove folder hierarchy in tests and other is to allow multiple paths in test script ex: nyc ts-mocha -p tsconfig.json test/**/*.ts test/*.ts.

@mayurkale22
Copy link
Member

This is what I found: mochajs/mocha#3115 and looks to be working in our scenario. Will open PR to fix it.

@OlivierAlbertini
Copy link
Member

@vmarchaud if you rebase (#233) you should see NodeTracer tests
/cc @mayurkale22

Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

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

LGTM

@mayurkale22
Copy link
Member

@vmarchaud Could you please fix the build?

@vmarchaud
Copy link
Member Author

@mayurkale22 should be good now

/**
* NodeTracerConfig provides an interface for configuring a Node Tracer.
*/
export interface NodeTracerConfig {
Copy link
Member

Choose a reason for hiding this comment

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

NodeTracerConfig same as BasicTracerConfig except one mandatory attribute. What's the motivation here? I proposed to keep ScopeManager optional attribute in #194. If we do that then we don't need to create NodeTracerConfig interface.

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is i cant extend the BasicTracerConfig to tell scopeManager is optional so i'm forced to make a new interface.
I agree that it should be optional and the BasicTracer should create a NoopScopeManager if none is used, if we agree we should open another PR

@mayurkale22 mayurkale22 merged commit 3404e4f into open-telemetry:master Sep 7, 2019
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.

6 participants