Skip to content

Add durable_function_first_invocation tag to aws.lambda spans#747

Draft
lym953 wants to merge 1 commit intomainfrom
yiming.luo/durable-first-invocation-tag
Draft

Add durable_function_first_invocation tag to aws.lambda spans#747
lym953 wants to merge 1 commit intomainfrom
yiming.luo/durable-first-invocation-tag

Conversation

@lym953
Copy link
Contributor

@lym953 lym953 commented Mar 13, 2026

Summary

  • Extends extract_durable_function_tags() to also return durable_function_first_invocation ("true"/"false")
  • The value is derived from the event payload: CheckpointToken is absent on the first invocation and present on replays, equivalent to not context.state.is_replaying()
  • No new decorator or runtime interception needed — follows the same pattern as durable_function_execution_name and durable_function_execution_id

Test plan

  • test_extracts_tags_from_event_without_checkpoint_tokendurable_function_first_invocation is "true" when CheckpointToken is absent
  • test_extracts_tags_from_event_with_checkpoint_tokendurable_function_first_invocation is "false" when CheckpointToken is present
  • Run pytest tests/test_durable.py — all 14 tests pass

🤖 Generated with Claude Code

Extends extract_durable_function_tags() to also include
durable_function_first_invocation ("true"/"false"), derived from the
absence of CheckpointToken in the event payload (present on replays,
absent on first invocation).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lym953 lym953 force-pushed the yiming.luo/durable-first-invocation-tag branch from 23be005 to 81cd12a Compare March 17, 2026 10:03
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