-
Notifications
You must be signed in to change notification settings - Fork 516
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
feat(mongodb): collect mongodb4 metrics #1170
feat(mongodb): collect mongodb4 metrics #1170
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1170 +/- ##
==========================================
- Coverage 96.13% 95.38% -0.76%
==========================================
Files 14 16 +2
Lines 906 997 +91
Branches 197 206 +9
==========================================
+ Hits 871 951 +80
- Misses 35 46 +11 |
…emetry-js-contrib into feat/add-mongodb-metrics
Do you want to wait for open-telemetry/opentelemetry-js#3267 to merge this ? |
@vmarchaud Yea, probably, thanks :) |
Converting to draft in the mean time :) |
@legendecas @dyladan Hi. I'm looking for reviewers who are familiar with metrics. Can you please review this PR? |
plugins/node/opentelemetry-instrumentation-mongodb/test/mongodb-v4.metrics.test.ts
Outdated
Show resolved
Hide resolved
…emetry-js-contrib into feat/add-mongodb-metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with mongodb. The metrics instrumentation looks good to me.
const inMemoryMetricsExporter = new InMemoryMetricExporter( | ||
AggregationTemporality.CUMULATIVE | ||
); | ||
const metricReader = new PeriodicExportingMetricReader({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: IIUC, a pulling metric reader might be better suited for testing usage since it can pull metrics proactively instead of awaiting timeouts.
plugins/node/opentelemetry-instrumentation-mongodb/test/mongodb-v4.metrics.test.ts
Outdated
Show resolved
Hide resolved
…b-v4.metrics.test.ts Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Looks like TAV is failing on line 137 in the v4 metrics tests, the idle state is now exporting |
…emetry-js-contrib into feat/add-mongodb-metrics
The type `V4Connection` re-introduced in open-telemetry#1170 is missing any type definitions or imports for `Document`, breaking the build with typecricpt strict mode. `V4Connection` in `types.ts` is not referenced anywhere (the type definition in `internal-types.ts` is used. So lets just drop this type definition. BREAKING CHANGE: removes the broken exported type `V4Connection`. Fixes open-telemetry#1639
The type `V4Connection` re-introduced in open-telemetry#1170 is missing any type definitions or imports for `Document`, breaking the build with Typescript strict mode. `V4Connection` in `types.ts` is not referenced anywhere (the type definition in `internal-types.ts` is used. So lets just drop this type definition. BREAKING CHANGE: removes the broken exported type `V4Connection`. Fixes open-telemetry#1639
The type `V4Connection` re-introduced in open-telemetry#1170 is missing any type definitions or imports for `Document`, breaking the build with Typescript strict mode. `V4Connection` in `types.ts` is not referenced anywhere (the type definition in `internal-types.ts` is used. So lets just drop this type definition. BREAKING CHANGE: removes the broken exported type `V4Connection`. Fixes open-telemetry#1639 Signed-off-by: Simon Berz <simon@berz.me>
The type `V4Connection` re-introduced in #1170 is missing any type definitions or imports for `Document`, breaking the build with Typescript strict mode. `V4Connection` in `types.ts` is not referenced anywhere (the type definition in `internal-types.ts` is used. So lets just drop this type definition. BREAKING CHANGE: removes the broken exported type `V4Connection`. Fixes #1639 Signed-off-by: Simon Berz <simon@berz.me>
Which problem is this PR solving?
Short description of the changes
Fixes #1157
Added metrics collection for MongoDB >= 4, according to:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/database-metrics.md
This is the first of many contributions planned under metrics collections at the instrumentation level, so I'll be really happy to get as much as comments as we can on this :)
Thanks!
Checklist
npm run test-all-versions
for the edited package(s) on the latest commit if applicable.