-
Notifications
You must be signed in to change notification settings - Fork 828
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
[http-plugin] ignoreIncomingPaths type error in TS #584
Comments
Should we use |
Can you add a minimal code sample reproduction? |
Sure!
|
|
To begin with, this is not valid: const tracer = new NodeTracer({
plugins: {
logLevel: opentelemetry.LogLevel.ERROR, // ERROR HERE
},
}); The log level is a configuration, not a plugin. You can do this: const tracer = new NodeTracer({
logLevel: opentelemetry.LogLevel.ERROR,
plugins: {
// http, grpc, etc
},
}); edit: one of the examples was actually bad For the The typing may need to be updated to allow plugin specific configs |
Thanks @dyladan , |
What made you think |
Fair enough, so it was indeed from the docs, I think I grepped for ignore one of these inspired me: FWIW it does work in regular JS... so it's a bit confusing! I use it here https://github.com/naseemkullah/k8s-job-dispatcher/blob/master/lib/tracer.js#L12 which is my goto reference (you've since added the Getting Started guide which is amazing btw). So we should use |
@naseemkullah well that depends... |
Thanks @dyladan that is insightful as I am trying to incorporate otel into some of our TS apps. Finally, back to the question of LogLevel, I am getting this:
From this
any ideas as to why? |
we have no default export. in fact i'm not sure why your script compiles at all. You probably have |
Thanks! |
For http/https config, you can look here https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-plugin-http#http-plugin-options Default config (interface) should be removed since it has been discussed during SIG that we don't want to have one unique config for all plugins. @mayurkale22 corrects me if I'm wrong. |
Alright |
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
v0.2.0
What version of Node are you using?
TS
What did you do?
added
ignoreIncomingPaths: [/\/healthz/]
, to the configWhat did you expect to see?
No type error
What did you see instead?
Additional context
If there is another way to config when using TS please add this to docs! Thanks
The text was updated successfully, but these errors were encountered: