-
Notifications
You must be signed in to change notification settings - Fork 40
Opentelemetry version 0.15 support #54
Comments
Hi @sidharthv96 Anyhow, we plan to migrate to v0.15.0 in the next week or so. |
Yes, I'm pretty new to the OpenTelemetry Ecosystem and was following tutorials which only had The express plugin also had similar issue. I was able to find the root cause after some digging around the release notes and source code. open-telemetry/opentelemetry-js#1764 (review) mentions how we should replace the usage of withSpan. It works perfectly after I downgraded all the versions to 0.14. ❤️ |
@sidharthv96 cool thanks for letting us know. Please let us know if you observe any other issues or experience unclarity when using this repo :) |
Awesome! |
Hi @sidharthv96 , This is the code I run which did not throw the above error: import { NodeTracerProvider } from '@opentelemetry/node';
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
const provider = new NodeTracerProvider({
plugins: {
kafkajs: {
enabled: true,
// You may use a package name or absolute path to the file.
path: "opentelemetry-plugin-kafkajs",
},
},
});
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.register();
import {Kafka} from 'kafkajs';
const kafka = new Kafka({
clientId: 'open-telemetry-demo',
brokers: ['localhost:9092'],
});
const producer = kafka.producer();
producer.connect().then( async () => {
console.log('connected');
await producer.send({topic: 'test', messages: [{value: 'hello world'}]});
}); and my package.json: {
"name": "otel-15-pg",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "ts-node index.ts"
},
"devDependencies": {
"typescript": "^4.1.3"
},
"dependencies": {
"@opentelemetry/node": "^0.15.0",
"@opentelemetry/tracing": "^0.15.0",
"kafkajs": "^1.15.0",
"opentelemetry-plugin-kafkajs": "^0.1.2",
"ts-node": "^9.1.1"
}
} and the output to console:
|
Got it @blumamir ! |
The change seems straight forward and is referenced in their upgrade guidelines. |
Thanks, I managed to reproduce it with consumer 👍 |
As
withSpan
was removed, the plugin will not work anymore.open-telemetry/opentelemetry-js#1764 (review)
Please mention in Readme to use version 0.14 till a fix is released.
The text was updated successfully, but these errors were encountered: