Skip to content

Reuse s3 MetricCollector state#801

Open
npololnskii wants to merge 1 commit intoAiven-Open:mainfrom
npololnskii:reuse-awssdk-metrics-collector
Open

Reuse s3 MetricCollector state#801
npololnskii wants to merge 1 commit intoAiven-Open:mainfrom
npololnskii:reuse-awssdk-metrics-collector

Conversation

@npololnskii
Copy link
Copy Markdown

@npololnskii npololnskii commented Feb 23, 2026

About this change - What it does:

S3 client metrics (JMX bean aiven.kafka.server.tieredstorage.s3:type=s3-client-metrics) stay at zero for operations different than GetObject, all other operation like PutObject, DeleteObjects, etc.

This change keeps a single shared Metrics and sensor map per JVM (via a static SharedMetrics holder). All MetricCollector instances record into that shared state, so the single JMX bean always reflects all S3 API calls. close() is a no-op so one collector’s shutdown does not unregister the shared metrics.

bean attribute's data for broker with storage-s3.jar built with this change
image
bean attribute's data for broker with storage-s3-1.1.1.jar
image

Resolves: #802
Why this way

@npololnskii npololnskii requested a review from a team as a code owner February 23, 2026 11:41
@npololnskii npololnskii changed the title Reuse aws sdk metrics collector Reuse s3 MetricCollector Feb 23, 2026
@npololnskii npololnskii changed the title Reuse s3 MetricCollector Reuse s3 MetricCollector state Feb 23, 2026
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.

Attributes of aiven.kafka.server.tieredstorage.s3:type=s3-client-metrics bean are not being updated

1 participant