Please answer these questions before submitting a bug report.
0.3.2
12.x.x
Used NodeTracerRegistry instead of NodeTracer
no error
const registry = new NodeTracerRegistry({
^
TypeError: NodeTracerRegistry is not a constructor
Add any other context about the problem here.
I need to see more code here before I can be sure what has happened, but all of the plugins, examples, and tests are working so something with your tsconfig might be wrong.
This is not within the opentelemetry-js codebase btw, I am trying to use this IRL, here is tracer.js :
const { JaegerExporter } = require('@opentelemetry/exporter-jaeger');
const opentelemetry = require('@opentelemetry/core');
const { NodeTracerRegistry } = require('@opentelemetry/node');
const { SimpleSpanProcessor } = require('@opentelemetry/tracing');
const registry = new NodeTracerRegistry({
logLevel: opentelemetry.LogLevel.ERROR,
plugins: {
http: {
enabled: true,
path: '@opentelemetry/plugin-http',
ignoreIncomingPaths: [/\/healthz/],
},
},
sampler: new opentelemetry.ProbabilitySampler(0.5),
});
const exporter = new JaegerExporter({serviceName: 'foo'});
registry.addSpanProcessor(new SimpleSpanProcessor(exporter));
opentelemetry.initGlobalTracerRegistry(registry);
module.exports = opentelemetry.getTracer();
@dyladan Are the named tracers supposed to work today in projects that use opentelemetry? or will it only be available in 0.3.3 ?
As per a colleague of mine:
NodeTracerRegistry is not defined
the require is not working
NodeTracer is the only export
Named tracer functionality is not yet released, it will be available with 0.3.3 release.
Doh! Thanks.
oh i'm sorry I didn't realize you were trying to use the npm version. yes it is not yet available
Is it possible to create release branches? e.g. branch 0.3.3, whereas master branch only has docs that are applicable today?
Please create a new discussion issue for that as it is a completely separate issue.