Skip to content

Conversation

@wkillerud
Copy link
Contributor

@wkillerud wkillerud commented Jun 11, 2025

Maybe we should print one of these per metric as well? Right now we only ever print one, even if multiple metrics have this problem.

Fixes #113

Example output:

DeprecationWarning: Got label exitCode for metric process_exception_handlers_terminate_timer using the meta property.

Using metric meta property for labels (eg. metric({ meta: { label: "value" } })) is now deprecated and will be removed in a future version.
Please use the labels key instead (eg metric({ labels: { label: "value" } })).

See https://github.com/metrics-js/client for up to date usage.

@wkillerud wkillerud force-pushed the deprecation-warning-detail branch from 51309ed to c033da6 Compare June 11, 2025 11:56
@wkillerud wkillerud merged commit 6726816 into main Jun 12, 2025
9 checks passed
@wkillerud wkillerud deleted the deprecation-warning-detail branch June 12, 2025 18:20
github-actions bot pushed a commit that referenced this pull request Jun 17, 2025
## [4.0.5](v4.0.4...v4.0.5) (2025-06-17)

### Bug Fixes

* include the metric and label names in deprecation warning ([#114](#114)) ([6726816](6726816))
@github-actions
Copy link

🎉 This PR is included in version 4.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print the metric that uses deprecated labels in meta

2 participants