-
-
Notifications
You must be signed in to change notification settings - Fork 7
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 signal->span-attrs-fn option to opentelemetry handler #28
Conversation
Thanks for this Benjamin! I'd like to understand your use-case a little better. Could you please give me some idea of what one would typically use What would your fn look like? Also, just checking if you're familiar with the |
my use-case is adding attributes to otel traces i'm sending to honeycomb.io. my yes, i've noticed |
Could you be a little more specific? E.g. are the attributes common to all signals, or signal specific? Can you give me an example of just a few of the attributes you plan to add? It'd be helpful to get an understanding of what problem you're actually trying to solve, and therefore what our best options might be.
Just to confirm: you want your custom attributes on the trace and not the log record? What if the handler supported the following?:
Or if we stick to your idea of an In principle I'd prefer to avoid making low-levels fns public unless really necessary. We may still want to make adjustments later. |
Some attributes are common to all signals, some are singal specific.
i'm not using the otel log handler, so i don't have a preference here 😄 a single
using something like |
looks good, thanks! |
Great, makes sense. I've updated the commit. If you have no other suggested improvements, I'll document the |
i'm closing this one in the meantime :) looking forward to the next release! |
Thanks to @benalbrecht for assistance on this feature!
Thanks to @benalbrecht for assistance on this feature!
Thanks to @benalbrecht for assistance on this feature!
Thanks to @benalbrecht for assistance on this feature!
I just updated v1.0.0-SNAPSHOT on Clojars. If you get an opportunity, would you please test this and confirm that it's working as expected? In that case, I expect to be able to release RC1 before the end of this month (Oct). Cheers! |
Thanks to @benalbrecht for assistance on this feature!
this PR adds a
:signal->span-attrs-fn
option to the opentelemetry handler for adding custom signal attributes to the corresponding opentelemetry span.the existing
signal->attrs
fn seems to be intended for log records and i'm not sure whether the result would be a good default for spans as well, so i've just made it public to have it available as an option.i've made the helper functions public as well to aid in creating a custom
signal->span-attrs-fn