Skip to content

feat(attributes): add support for spanAttributes, which allows to capture values - #4

Open
Litarnus wants to merge 15 commits into
mainfrom
capture-span-attributes
Open

feat(attributes): add support for spanAttributes, which allows to capture values#4
Litarnus wants to merge 15 commits into
mainfrom
capture-span-attributes

Conversation

@Litarnus

@Litarnus Litarnus commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Add support for the special attribute spanAttributes which allows the extension to capture parameters and add them to the metadata array.

For example:

function foo(string $name) { ... }

\Sentry\instrument(null, "foo", spanAttributes: ['description' => 'name']);

setEndCallback(static function(array $data) {
    $data['metadata']['description']; <- will contain "example", the value of $name
});

foo("example");

Comment thread sentry.c
Comment thread span_attributes.c
Comment thread sentry.c
Comment thread sentry.c

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3a7a4d8. Configure here.

Comment thread span_attributes.c
Base automatically changed from variadic-metadata to main June 25, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant