Skip to content
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

Error: Cannot read properties of undefined (reading 'getMeterProvider') since v5.0.0 #371

Open
Djiit opened this issue Dec 23, 2022 · 2 comments

Comments

@Djiit
Copy link

Djiit commented Dec 23, 2022

Hey,

When trying to upgrade to v5, I'm having this error:

TypeError: Cannot read properties of undefined (reading 'getMeterProvider')
    at getOrCreateObservableGauge (/Users/(...)/node_modules/nestjs-otel/src/metrics/metric-data.ts:79:25)
    at MetricService.getObservableGauge (/Users/(...)/node_modules/nestjs-otel/src/metrics/metric.service.ts:36:38)

Also got the same with getCounter.

Happy to help providing more info. Thanks

@pragmaticivan
Copy link
Owner

Hi, @Djiit Could you share the list of packages you are using right now? Otel JS SDK has updated a few interfaces in this version.

@Djiit
Copy link
Author

Djiit commented Dec 28, 2022

Hi, sure, here are the related packages:

    "@opentelemetry/api": "^1.3.0",
    "@opentelemetry/auto-instrumentations-node": "^0.35.0",
    "@opentelemetry/auto-instrumentations-web": "^0.31.0",
    "@opentelemetry/context-async-hooks": "^1.8.0",
    "@opentelemetry/context-zone": "^1.8.0",
    "@opentelemetry/exporter-prometheus": "^0.34.0",
    "@opentelemetry/exporter-trace-otlp-http": "^0.34.0",
    "@opentelemetry/propagator-b3": "^1.8.0",
    "@opentelemetry/sdk-node": "^0.34.0",
    "@opentelemetry/sdk-trace-web": "^1.8.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants