feat(attributes): Add cloudflare.agent attributes to identify agents - #541
feat(attributes): Add cloudflare.agent attributes to identify agents#541JPeer264 wants to merge 1 commit into
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Other
Internal Changes 🔧Attribute
Attributes
Deps
Other
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Hmm I'm wondering if we can use more generic non-cloudflare-scoped attributes here?
cloudflare.agent.name->gen_ai.agent.namecloudflare.agent.class->code.function.name(assuming this is about the actual code class name). While a class is not a function, I think this could be close enough here. OTel is quite liberal in the example values for this attribute.
|
Is |
No it is mainly to create more value on the span itself. Especially if there are more agents running at the same time.
I like your ideas actually
It is about the class it extends from, so its parent class |
|
Thanks! Ideally we don't add too many cloudflare(-or-any-other-lib/framework/plaform)-specific attributes when there are reasonable, more general replacements. Lmk if you wanna continue with any of these attributes :) |
Totally agree. In this case I missed the alternatives. I'll close this as both of the alternatives are already in |
Description
This adds
cloudflare.agent.name(name of the instance name) andcloudflare.agent.class(name of the class name - could beAgent,AIChatAgentor similar).PR Checklist
yarn testand verified that the tests pass.yarn generateto generate and format code and docs.If an attribute was added:
nextjs.function_id, notfunction_id)apply_scrubbing(i.e.manualorauto. Useneveronly for values that should never be scrubbed such as IDs)If an attribute was deprecated: