Correlations: Add links to prometheus dataframe where labels are split out #67736
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.
What is this feature?
When prometheus queries are ran in explore, individual fields are kept in the "labels" section of the data frame except for one dataframe that breaks out the labels for displaying a table. That dataframe gets
-Instant
appended onto the refId, which causes the datasource lookup to not work and returned undefined.This adds logic where if the datasource comes back undefined, it checks on if its from a prometheus query and if so, removes the
-Instant
part of the refID to do the datasource lookup. Then the correlation is added to the dataframe as normal and the data link shows up in the prometheus table.Why do we need this feature?
So the prometheus explore visualization can show data links.
Who is this feature for?
For enabling correlations with prometheus datasources as the source.
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
You will need the 'correlations' feature flag enabled, and a prometheus datasource that is editable.
I would recommend using
job
as a variable.Please check that: