DataFrame: Align frame (__series.name) and field naming (__field.name) #69621
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a big mismatch in how we handle getFrameDisplayName and getFieldDisplayName. The problem is pretty big because we use getFrameDisplayName to evaluate
${__series.name}
(which is a macro we do show first in data link auto-complete menu).The current logic for getFrameDisplayName results in a very different name compared to getFieldDisplayName (Which we use almost everywhere else for the value field of a single time series frame).
So for time series with 2 fields (time, value) and the value field has say a displayName or displayNameFromDS
${__series.name}
will currently just result inSeries (<refId>)
which is pretty far from the display name actually used in all visualizations (which is the getFieldDisplayName for the value field).Changes
This could be a pretty big breaking change as it changes frame display names. not really sure where we use frame display names where it could cause a breaking change (other than in data links that use
${__series.name}
and are counting on the bad current behavior.Escalation where I discovered this
https://github.com/grafana/support-escalations/issues/6199
Release notice breaking change
The implementation for template macro
${__series.name}
was not always correct, resulting in an interpolation that was very different from the series name displayed in the visualization. We have now fixed this issue so that it does show the same name. Depending on how${__series.name}
is used this could result in a minor breaking change.