Skip to content

[spm] Default normalize duration to true to match spanmetricsconnector#7847

Closed
hxrshxz wants to merge 3 commits intojaegertracing:mainfrom
hxrshxz:fix-spm-normalize-duration-default
Closed

[spm] Default normalize duration to true to match spanmetricsconnector#7847
hxrshxz wants to merge 3 commits intojaegertracing:mainfrom
hxrshxz:fix-spm-normalize-duration-default

Conversation

@hxrshxz
Copy link
Copy Markdown

@hxrshxz hxrshxz commented Jan 8, 2026

Which problem is this PR solving?

Fixes jaegertracing/jaeger-ui#2088

The OTel spanmetricsconnector now produces metrics with normalized names like duration_milliseconds_bucket by default, but Jaeger's default configuration has NormalizeDuration = false, causing queries for duration_bucket (the old metric name). This results in "No Data" being displayed for latency metrics in the SPM Monitor tab.

Description of the changes

  • Changed defaultNormalizeDuration from false to true in options.go to match the new OTel spanmetricsconnector default behavior
  • Fixed a copy-paste bug where NormalizeDuration was incorrectly initialized with defaultNormalizeCalls instead of defaultNormalizeDuration

How was this change tested?

  • All existing tests pass: go test ./internal/storage/metricstore/prometheus/... -v
  • Lint checks pass: make lint

Checklist

  • I have read the contributing guidelines
  • I have signed all commits
  • I have added unit tests for the new functionality
  • I have run lint and test steps successfully locally

Copilot AI review requested due to automatic review settings January 8, 2026 22:15
@hxrshxz hxrshxz requested a review from a team as a code owner January 8, 2026 22:15
@hxrshxz hxrshxz requested a review from pavolloffay January 8, 2026 22:15
@dosubot dosubot Bot added area/storage go Pull requests that update go code labels Jan 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a mismatch between Jaeger's default configuration and the OTel spanmetricsconnector's default behavior for metric name normalization. The spanmetricsconnector now produces normalized metric names like duration_milliseconds_bucket by default, but Jaeger was querying for the old unnormalized name duration_bucket, causing "No Data" to be displayed in the SPM Monitor tab.

Key changes:

  • Updated defaultNormalizeDuration from false to true to align with OTel spanmetricsconnector defaults
  • Fixed a copy-paste bug where NormalizeDuration was incorrectly initialized with defaultNormalizeCalls instead of defaultNormalizeDuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/storage/metricstore/prometheus/options.go
@hxrshxz hxrshxz force-pushed the fix-spm-normalize-duration-default branch from 5622a0d to 2428e7c Compare January 8, 2026 22:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a breaking change?

defaultLatencyUnit = "ms"
defaultNormalizeCalls = false
defaultNormalizeDuration = false
defaultNormalizeDuration = true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the implication of two different defaults for "calls" and "duration"?

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You may re-open it if you need more time.

@github-actions github-actions Bot added the stale The issue/PR has become stale and may be auto-closed label Mar 16, 2026
@github-actions
Copy link
Copy Markdown

This pull request has been automatically closed due to inactivity. You may re-open it if you need more time. We really appreciate your contribution and we are sorry that this has not been completed.

@github-actions github-actions Bot closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage go Pull requests that update go code stale The issue/PR has become stale and may be auto-closed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SPM monitor tab does not show Latency data

3 participants