You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's been super helpful so far, so great job to the team.
My project uses express and typescript. I have converted everything necessary to typescript successfully, except for the function filterSampler in https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/examples/express/tracer.js . In the line shouldSample(ctx, tid, spanName, spanKind, attr, links) { the TS compiler doesn't like it because none of ctx, tid, spanName, spanKind, attr or links are defined or imported anywhere in the file.
I am curious
A) are these somehow global variables? Is it expected that they aren't imported or defined in the file?
B) Do you have any recommendations to fix this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am new to otel and I'm using the example here as a base to get started: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/express
It's been super helpful so far, so great job to the team.
My project uses express and typescript. I have converted everything necessary to typescript successfully, except for the function
filterSampler
in https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/examples/express/tracer.js . In the lineshouldSample(ctx, tid, spanName, spanKind, attr, links) {
the TS compiler doesn't like it because none of ctx, tid, spanName, spanKind, attr or links are defined or imported anywhere in the file.I am curious
A) are these somehow global variables? Is it expected that they aren't imported or defined in the file?
B) Do you have any recommendations to fix this?
Thanks, and cheers!
Beta Was this translation helpful? Give feedback.
All reactions