Skip to content

Add test case verifying metric capture in Setup() lifecycle method - #39965

Open
kragent66-glitch wants to merge 1 commit into
apache:masterfrom
kragent66-glitch:fix/beam-27038-setup-metrics-doc
Open

Add test case verifying metric capture in Setup() lifecycle method#39965
kragent66-glitch wants to merge 1 commit into
apache:masterfrom
kragent66-glitch:fix/beam-27038-setup-metrics-doc

Conversation

@kragent66-glitch

Copy link
Copy Markdown

Hi!

This PR adds a test case to to clarify how metrics can be captured during the lifecycle method of a .

Background

I investigated BEAM-27038 and found that the behavior of metrics in is tied to how the Go SDK handles context.

  • If the method accepts a argument, the framework correctly passes the bundle's context, and metrics are captured.
  • If the method does not accept context, any metrics incremented using are correctly (but perhaps unexpectedly) dropped.

Changes

  • Added to verify that metrics are captured when accepts context.
  • Added to verify the expected behavior when does not accept context.

This PR aims to serve as a documentation-by-test for this convention.

Thanks!

@github-actions github-actions Bot added the go label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant