-
Notifications
You must be signed in to change notification settings - Fork 842
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
getNodeAutoInstrumentations
type error when initializing tracing in TypeScript
#2964
Comments
I'm quite sure this is because no release from If you want to use instrumentations form contrib it's most likely needed to stick on SDK 1.0.0/0.27.0 until a new release is done here. |
Thanks @Flarna, that would make sense. I have an older app where this doesn't reproduce. Are there circumstances where it's not a good idea to do instrumentation package releases after a core package? I'm not familiar with the release strategy here. (also, would this issue be better in the contrib repo? Apologies if this is in the wrong place) |
The work to get contrib modules released is ongoing. There are quite some changes needed to update dependencies and keep all the various npm modules happy. An the number of people working on this is not that high.
Yes and contrib repo would be better in this case but as the people involved are mostly the same it's not that cirical. |
Thanks for the explanation @Flarna, I appreciate it! I'll let some folks who ran into this know for now, and keep my eyes peeled for the next release. |
For those of us that are new, is there a getting started guide that currently works? |
The getting started guide as-written should work with the older package versions. |
OTel contrib pacakges were released yesterday but something went wrong and upload to NPM is missing, see open-telemetry/opentelemetry-js-contrib#947 |
This is now happening again with the latest
|
Yes, unfortunately. I fear such compatibility problems will persist as long metrics and instrumentations are in experimental phase. |
It is working for me with these versions, in case it helps anyone: "@opentelemetry/auto-instrumentations-node": "0.28.0",
"@opentelemetry/sdk-node": "0.27.0", |
I believe it should be working with:
|
@cartermp can you confirm the above versions work for you? |
Works for me. |
Confirmed it works! Thanks for getting updates plumbed through 🙂 |
Consider the following express app with tracing initialized from docs/readme:
index.ts
:tracing.ts
:And requiring
tracing.ts
in the npm manifest:"start": "nodemon -r ./tracing.ts index.ts",
a type error is present:
At face value, type types appear as though they would be compatible. If I change the
getNodeAutoInstrumentations()
line to cast toany
, then everything works as expected.If I remove the array brackets around and change it to
instrumentations: getNodeAutoAutoInstrumentations()
, I get a much gnarlier type error:gnarlier type error
I'm not familiar with the otel-js codebase and its recent changes, so I wouldn't know where to look from here.
What version of OpenTelemetry are you using?
What version of Node are you using?
v16.13.0
The text was updated successfully, but these errors were encountered: