-
Notifications
You must be signed in to change notification settings - Fork 957
Update JSDoc for types.ts for PrometheusExporter #6191
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
Conversation
|
Thanks for the contribution ! Could you add a changelog entry in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6191 +/- ##
=======================================
Coverage 95.41% 95.41%
=======================================
Files 317 317
Lines 9460 9460
Branches 2199 2199
=======================================
Hits 9026 9026
Misses 434 434 🚀 New features to boost your workflow:
|
|
@raphael-theriault-swi done ✅ |
The JSDoc has a mismatch with the actual default values of PrometheusExporter. It's false and not true
raphael-theriault-swi
left a comment
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.
Thank you !
Which problem is this PR solving?
The JSDoc for the
ExporterConfig.appendTimestampconfiguration option in the Prometheus exporter incorrectly states that the default value istrue.However, the actual implementation in
PrometheusExporter.tsexplicitly defines the default asfalseinstatic readonly DEFAULT_OPTIONS:https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-exporter-prometheus/src/PrometheusExporter.ts#L31
This PR resolves the inconsistency to prevent user confusion—something I initially experienced when reading the JS sources and .d.ts files.
Short description of the changes
experimental/packages/opentelemetry-exporter-prometheus/src/export/types.tsto reflect that@defaultisfalse.Type of change
How Has This Been Tested?
This is a documentation-only change (JSDoc fix) and does not alter runtime behavior. I verified the default value by inspecting the source code in
PrometheusExporter.tsandPrometheusSerializer.ts.Checklist: