Skip to content

feat(storagenode): migrate metrics to OpenTelemetry histogram wrappers #1118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: cached_histogram_metrics_wrapper
Choose a base branch
from

Conversation

ijsong
Copy link
Member

@ijsong ijsong commented May 23, 2025

What this PR does

Replace existing metrics with OpenTelemetry histogram wrappers. Convert several
metric types from counters to histograms to capture measurement distributions.

Converted from counter to histogram:

  • sn.append.preparation
  • sn.sequencer.operation.duration
  • sn.sequencer.fanout.duration
  • sn.writer.operation.duration
  • sn.committer.operation.duration
  • sn.committer.logs
  • sn.replicate.client.operation.duration
  • sn.replicate.duration
  • sn.replicate.fanout.duration

Migrated to OpenTelemetry histogram wrapper (already histogram):

  • log_rpc.server.duration
  • log_rpc.server.log_entry.size
  • log_rpc.server.batch.size
  • log_rpc.server.log_entries_per_batch

This improves observability by enabling distribution analysis for these metrics.

@ijsong ijsong requested a review from hungryjang as a code owner May 23, 2025 11:25
Copy link

codecov bot commented May 23, 2025

Codecov Report

Attention: Patch coverage is 98.72611% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (cached_histogram_metrics_wrapper@ffffa30). Learn more about missing BASE report.

Files with missing lines Patch % Lines
internal/storagenode/telemetry/metrics.go 98.37% 2 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                         @@
##             cached_histogram_metrics_wrapper    #1118   +/-   ##
===================================================================
  Coverage                                    ?   79.58%           
===================================================================
  Files                                       ?      178           
  Lines                                       ?    21581           
  Branches                                    ?        0           
===================================================================
  Hits                                        ?    17176           
  Misses                                      ?     3628           
  Partials                                    ?      777           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ijsong ijsong force-pushed the cached_histogram_metrics_wrapper branch from 2aa5903 to cc195ac Compare May 26, 2025 04:39
@ijsong ijsong force-pushed the storagenode_change_metric_types_from_counter_to_histogram branch from b568209 to 42a7040 Compare May 26, 2025 04:39
@ijsong ijsong force-pushed the cached_histogram_metrics_wrapper branch from cc195ac to 316114e Compare June 2, 2025 01:02
@ijsong ijsong force-pushed the storagenode_change_metric_types_from_counter_to_histogram branch from 42a7040 to 48ee4b7 Compare June 2, 2025 01:03
@ijsong ijsong force-pushed the cached_histogram_metrics_wrapper branch from 316114e to 2184b7e Compare June 12, 2025 04:09
@ijsong ijsong force-pushed the storagenode_change_metric_types_from_counter_to_histogram branch from 48ee4b7 to 028c140 Compare June 12, 2025 04:10
@ijsong ijsong force-pushed the cached_histogram_metrics_wrapper branch from 2184b7e to bc0d663 Compare June 12, 2025 13:57
@ijsong ijsong force-pushed the storagenode_change_metric_types_from_counter_to_histogram branch from 028c140 to be7248a Compare June 12, 2025 13:57
Replace existing metrics with OpenTelemetry histogram wrappers. Convert several
metric types from counters to histograms to capture measurement distributions.

Converted from counter to histogram:

- sn.append.preparation
- sn.sequencer.operation.duration
- sn.sequencer.fanout.duration
- sn.writer.operation.duration
- sn.committer.operation.duration
- sn.committer.logs
- sn.replicate.client.operation.duration
- sn.replicate.duration
- sn.replicate.fanout.duration

Migrated to OpenTelemetry histogram wrapper (already histogram):

- log_rpc.server.duration
- log_rpc.server.log_entry.size
- log_rpc.server.batch.size
- log_rpc.server.log_entries_per_batch

This improves observability by enabling distribution analysis for these metrics.
@ijsong ijsong force-pushed the cached_histogram_metrics_wrapper branch from bc0d663 to ffffa30 Compare June 14, 2025 05:47
@ijsong ijsong force-pushed the storagenode_change_metric_types_from_counter_to_histogram branch from be7248a to f64d948 Compare June 14, 2025 05:47
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