Skip to content
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

[v10.2.x] InfluxDB: Fix aliasing with $measurement or $m on backend mode #77383

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

grafana-delivery-bot[bot]
Copy link
Contributor

Backport 5eb0b2b from #76917


What is this feature?

When you have multiple measurements in the response and have $measurement or $m as alias, the result is not being rendered properly. This PR is addressing that issue by getting the measurement from the response itself.

Who is this feature for?

InfluxDB backend mode users who have $measurement or $m as alias and have multiple measurements

Which issue(s) does this PR fix?:

Fixes #52844

Special notes for your reviewer:

How to test it?

  • enable InfluxDB backend mode influxdbBackendMigration=true
  • Go to explore and select influxdb datasource (ideally 1.x version for easy testing)
  • Switch to code editor
  • Paste this query SELECT mean("value") FROM /.*/ WHERE $timeFilter GROUP BY time($__interval) fill(null)
  • Paste $measurement as alias
  • Observe you get no measurement in the legend and in the table columns
  • Switch to this branch and try again
  • Observe that you get your measurements

* better interpolation $measurement aliasing

* unit tests

(cherry picked from commit 5eb0b2b)
@itsmylife itsmylife merged commit 717a936 into v10.2.x Oct 30, 2023
@itsmylife itsmylife deleted the backport-76917-to-v10.2.x branch October 30, 2023 15:17
@aangelisc aangelisc modified the milestones: 10.2.x, 10.2.1 Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants