-
Notifications
You must be signed in to change notification settings - Fork 1
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
OpenTelemetry Inner Spans/Manual Telemetry #12
Conversation
@rjawesome This is a great start but something seems off...testing on my local it appears that context isn't properly being carried, so various spans end up having no or incorrect parents when viewed in Jaeger. |
It may be possible to switch back from JaegerExporter, will need some testing against CI that I can do later. For now, could you tell me your test setup to see if I can replicate the behavior you're seeing? |
environment variables: JAEGER_SERVER=localhost bte run: pnpm run start |
I wasn't able to get any reports to show up in jaeger with your setup. Trying the following setup did work for me (after changing Amend docker run -d --name jaeger -p 16686:16686 -p 6832:6832/udp -p 4318:4318 -p 6381:6831/udp --runtime=runc jaegertracing/all-in-one:latest
JAEGER_HOST=localhost pnpm start I ran a basic /v1/query as a test. |
Using your setup, adding a timeout seemed to make it more reliable for me (sometimes for me it doesn't work on the first query, so try running it a couple times). Also the HTTP exporter seems more reliable than the Proto for OTLP (see the second code thing) In taskHandler.js (should require opentelemetry.js at the top as well which is in this branch) ...
try {
transaction.finish();
span.end();
Telemetry.removeOtelSpan();
} catch (error) {
debug("Sentry/OpenTelemetry transaction finish error. This does not affect execution.");
debug(error);
}
await new Promise((resolve, reject) => {
setTimeout(resolve, 5000);
})
debug(`Worker thread ${threadId} completed ${workerData.queue} task.`);
... also, my implementation of trace exporter in opentelemetry.js (seems to be more reliable with HTTP -> see the import) const { OTLPTraceExporter } = require("@opentelemetry/exporter-trace-otlp-http");
traceExporter: new OTLPTraceExporter({
url: `http://${process.env.JAEGER_HOST}:4318/v1/traces`,
}), |
biothings/biothings_explorer#741