Skip to content

Scheduler.run: properly close metricsScope - #1734

Merged
chenylee-aws merged 1 commit into
awslabs:masterfrom
john-karp:scheduler-metrics-scope
May 1, 2026
Merged

chenylee-aws merged 1 commit into
awslabs:masterfrom
john-karp:scheduler-metrics-scope

Conversation

@john-karp

Copy link
Copy Markdown
Contributor

Scheduler.run() is creating a MetricsScope, but it never calls end() on it, either directly or with MetricsUtil.endScope. This means that the metrics from Scheduler.run() are never published.

This issue has been present since KCL v3.0.0: fbfd74d / https://github.com/awslabs/amazon-kinesis-client/blame/fbfd74df39bf1714a2faee21d21bbff5b885f095/amazon-kinesis-client/src/main/java/software/amazon/kinesis/coordinator/Scheduler.java#L442-L455

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@chenylee-aws
chenylee-aws merged commit 3681a56 into awslabs:master May 1, 2026
1 of 2 checks passed

This branch had an error being deployed

1 failed deployment
manual-approval β€” e31626ae Deployed Apr 28, 2026 by john-karp via wait-for-approval #136
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