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
Add a derive feature to allow deriving conversions into common types #1686
base: main
Are you sure you want to change the base?
Conversation
|
c0b0aff
to
91235f2
Compare
Thanks for the PR. Correct me, this derive attribute conversion would be useful only for the metrics, as we would be using tokio-tracing for logs, and possibly for traces too. Good to get more feedbacks :) |
I'd also suggest to hold off from adding new public API without sufficient demand. |
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.
See #1686 (comment)
I admit I use otel for metrics, I don't know if the Key/Value related types are used in other contexts, but since they are in
I implemented it this way because it is the usual Rust way. See e.g. Making it another crate will require actually two crates (something like
if your code uses both the type and the macro. But at the end of the day it is your call, I'll refactor it this way. |
Fixes #1685
Changes
Implemented suggested derive macros for Key/Value related types.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes