You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "xiongpan828 (via GitHub)" <gi...@apache.org> on 2026/06/14 03:49:11 UTC

[PR] feat(opentelemetry): Supports injecting custom attributes into open t… [apisix]

xiongpan828 opened a new pull request, #13556:
URL: https://github.com/apache/apisix/pull/13556

   ### Description
   
   This PR adds support for injecting user-defined custom attributes into OpenTelemetry spans. Currently, the OpenTelemetry plugin only allows a fixed set of attributes. With this change, users can configure an `additional_custom_attributes` map (key-value pairs with string values) in the plugin configuration. These attributes are then merged into the span's attribute list using the existing `inject_attributes` helper.
   
   The main changes are in `apisix/plugins/opentelemetry.lua`:
   
   - Added schema definition for `additional_custom_attributes` as an object with string values.
   - In the span creation logic, if `conf.additional_custom_attributes` is present, the keys are collected and passed to `inject_attributes` to populate the span attributes.
   
   This enhancement allows users to attach arbitrary metadata (e.g., user ID, region, version) to traces without modifying the plugin code.
   
   #### Which issue(s) this PR fixes:
   Fixes # (no existing issue; this is a feature enhancement)
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(opentelemetry): Supports injecting custom attributes into open t… [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #13556: feat(opentelemetry): Supports injecting custom attributes into open t…
URL: https://github.com/apache/apisix/pull/13556


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(opentelemetry): Supports injecting custom attributes into open t… [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13556:
URL: https://github.com/apache/apisix/pull/13556#issuecomment-5279193366

   This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(opentelemetry): Supports injecting custom attributes into open t… [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13556:
URL: https://github.com/apache/apisix/pull/13556#issuecomment-5632963446

   This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org