-
Notifications
You must be signed in to change notification settings - Fork 309
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
Log injection breaks when upgrading from v0.15.5 to v0.16.2 #780
Comments
In general it should be fine to move |
When I add
|
Ok, I'll look into it. At a minimum I'll move |
Very nice! Thanks for quickly resolving this. |
Describe the bug
When upgrading dd-trace to v0.16.2 logs do not contain dd (https://github.com/DataDog/dd-trace-js/blob/v0.16.2/packages/dd-trace/src/plugins/util/log.js#L13-L16) block any more.
The issue seems to be in
Instrumenter.enable
method https://github.com/DataDog/dd-trace-js/blob/v0.16.2/packages/dd-trace/src/instrumenter.js#L39-L52 Namely, plugins do not get auto-instrumented, becausethis._enabled
is set totrue
after setting and loading the plugins and not before.load
method simply returns ifthis._enabled
is false: https://github.com/DataDog/dd-trace-js/blob/v0.16.2/packages/dd-trace/src/instrumenter.js#L98 Movingthis._enabled = true
to the begging ofenable
method fixes log injection issue, but might introduce others.Environment
DD_LOGS_INJECTION=true
DD_TRACE_ANALYTICS_ENABLED=true
DD_RUNTIME_METRICS_ENABLED=true
Alpine Linux 3.9.4
v10.17.0
v0.16.2
v6.15.1
The text was updated successfully, but these errors were encountered: