Skip to content

fix: [SVLS-8538] apply durable function tags via setTag on the active span#762

Merged
lym953 merged 3 commits into
mainfrom
yiming.luo/fix-durable-function-tags
Apr 14, 2026
Merged

fix: [SVLS-8538] apply durable function tags via setTag on the active span#762
lym953 merged 3 commits into
mainfrom
yiming.luo/fix-durable-function-tags

Conversation

@lym953
Copy link
Copy Markdown
Contributor

@lym953 lym953 commented Apr 13, 2026

Problem

The tags aws_lambda.durable_function.execution_name and aws_lambda.durable_function.execution_id do not appear on the aws.lambda span as expected.

Summary

  • The tags were being passed through options.tags in tracer.wrap(), but that path does not reliably propagate to the actual span
  • Fix: apply them directly via span.setTag() in onEndingInvocation(), the same mechanism used for http.status_code
  • Added a test verifying setTag is called with the durable function context values

Test

Steps:

  • Build a JS layer
  • Install it on a function
  • Invoke the function

Result:
Tags appear on the aws.lambda span
image

lym953 and others added 3 commits April 13, 2026 15:07
… span

Tags for aws_lambda.durable_function.* were set through options.tags in
tracer.wrap(), but that path does not reliably reach the aws.lambda span.
Apply them directly via span.setTag() in onEndingInvocation(), the same
way http.status_code is applied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lym953 lym953 marked this pull request as ready for review April 13, 2026 19:30
@lym953 lym953 requested review from a team as code owners April 13, 2026 19:30
@lym953 lym953 requested a review from duncanista April 13, 2026 19:30
@lym953
Copy link
Copy Markdown
Contributor Author

lym953 commented Apr 14, 2026

The job "[dd-gitlab/publish layer sandbox" keeps failing. Ignoring it and merging this PR.

@lym953 lym953 merged commit f8bbb2a into main Apr 14, 2026
38 of 41 checks passed
@lym953 lym953 deleted the yiming.luo/fix-durable-function-tags branch April 14, 2026 15:24
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.

2 participants