-
Notifications
You must be signed in to change notification settings - Fork 550
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
dependency version mismatch in instrumentation-express
#1051
Comments
You should use Work regarding this is ongoing (e.g. #1042). |
I'll risk stating the obvious here, but adding a caret won't help. ^0.28.0 does not resolve to 0.29.0, it resolves to 0.28.x. Also, is there any documentation explaining which versions of each package are compatible? I just pulled the latest version of everything. How do I know which packages have to be 0.28.0 and which ones 0.29.0? I have other opentelemetry dependencies too, I just didn't list them all out. I just tried changing them all to |
OK, finally found a combination that worked... |
Unfortunately there is no such table. As long as some packages are in the experimental phase (0.x version) it's even harder to get some sort of rule as NPM interprets a Besides that there are Otel components not hosted in the I guess this is not the answer you would like to hear and I would be happy if there is a better solution. If you have any ideas how to improve this let us know. |
The spec for I think the root of this is that some of our external interface is still concrete classes and everything should be an interface |
yes, the correct solution would be to reduce the coupling by introducing stable interfaces for everything. The short term solution would be releasing all these packages in lock step - even if some of them don't have any new commits, release a new version just so they're always in sync. |
stable interfaces and experimental version numbers are usually not the best friends :o) |
well, then releasing them in lock step is the only solution. Stable interfaces is more of a long-term goal for when these packages get near "stable" status. |
The instrumentation base class only uses API and metrics API types, no SDK types which means it should be OK once the interface is stable (which it is now) |
the problem is that metrics types were added to the instrumentation base class before they were stabilized. we won't make this mistake for future signals |
I believe this should be fixed by #1042 |
Unlinking the PR actually because this isn't fixed until it is released. I'll link the release PR when #1042 is merged |
This seemed to be released on github but not in npm. @dyladan - any idea why? |
Lockstepped releases is a tricky solution because of the reasons @Flarna has also mentioned:
There's no ideal solution. Best one I know is to convert the instrumentation away from using concrete classes. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This looks obsolete; AFAICS the express module is fine now. |
What version of OpenTelemetry are you using?
@opentelemetry/api
: 1.1.0@opentelemetry/sdk-node
: 0.29.0@opentelemetry/instrumentation-express
: 0.29.0What version of Node are you using?
16.15.1
What did you do?
import the three packages above and then add
ExpressInstrumentation
to the instrumentations list when initializingNodeSDK
.What did you expect to see?
No errors
What did you see instead?
Typescript failed to compile:
Additional context
Upon investigating my package-lock.json I found that
@opentelemetry/instrumentation-express@0.29.0
imports@opentelemetry/istrumentation@^0.28.0
which creates a version mismatch (0.29.0 vs 0.28.0). The compilation error comes from my dependency tree having two different versions of@opentelemetry/api-metrics
: 0.28.0 and 0.29.0.The text was updated successfully, but these errors were encountered: