-
Notifications
You must be signed in to change notification settings - Fork 533
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
chore: fixing running task in a proper zone preserving the active zone #88
Conversation
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
=======================================
Coverage 94.51% 94.52%
=======================================
Files 62 62
Lines 3520 3522 +2
Branches 372 372
=======================================
+ Hits 3327 3329 +2
Misses 193 193
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@open-telemetry/javascript-maintainers ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry I thought I had already reviewed this. I looked through the code but must have forgotten to click the approve button
} | ||
return activeZone.run(() => { | ||
try { | ||
return plugin._tracer.withSpan(span as api.Span, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you have to do Type Assertion here (span as api.Span
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not be required as the assertion on line 319 should remove undefined
from the type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a compiler error / issue. the internal _createSpan returns api.Span or undefined. Even though there is if
check for span existence the compiler still complains. If you have a better idea how to change it I'm open for suggestion.
plugins/web/opentelemetry-plugin-user-interaction/test/userInteraction.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. We should have another PR to bump all otel deps to 0.9
Thank you for getting this fixed @obecny. Can we release a new version for this package any time soon? |
Yes I'll try to cut this today or tomorrow |
Which problem is this PR solving?
Web tracer, zone context manager and User Interaction plugin does not work with Angular opentelemetry-js#1206
For full fix another PR is needed from sdk
open-telemetry/opentelemetry-js#1209
Short description of the changes