Skip to content

feat: enable Logs Drilldown link in Metrics Drilldown #1389

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

Merged
merged 4 commits into from
Jul 9, 2025

Conversation

NWRichmond
Copy link
Contributor

@NWRichmond NWRichmond commented Jul 8, 2025

Context

This PR supports grafana/metrics-drilldown#524

What does this do?

Adds 'grafana-metricsdrilldown-app/open-in-logs-drilldown/v1' as another extension point that can leverage the "Open in Grafana Logs Drilldown" link

Demo

On a feature branch in Metrics Drilldown, the extension point is working as expected in the Related Logs tab:

demo.related.logs.open.in.related.logs.preserve.time.range.and.labels.mov

Testing the full experience

It's tedious to do all of the setup involved in testing that this extension point not only exists, but also achieves the goals described in grafana/metrics-drilldown#524. But if you're feeling brave, the full testing instructions are provided in the How to test section of grafana/metrics-drilldown#535.

@NWRichmond NWRichmond requested a review from a team as a code owner July 8, 2025 22:27
@CLAassistant
Copy link

CLAassistant commented Jul 8, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@NWRichmond NWRichmond requested a review from gtk-grafana July 8, 2025 22:28
@gtk-grafana gtk-grafana requested a review from L2D2Grafana July 9, 2025 14:01
Copy link
Collaborator

@L2D2Grafana L2D2Grafana 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 something metrics will want released to prod quickly?

targets: [
PluginExtensionPoints.DashboardPanelMenu,
PluginExtensionPoints.ExploreToolbarAction,
'grafana-metricsdrilldown-app/open-in-logs-drilldown/v1',
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you update with latest main. I think the only change you will need to make is adding 'grafana-metricsdrilldown-app/open-in-logs-drilldown/v1',

@@ -35,32 +35,18 @@ export const ExtensionPoints = {
MetricInvestigation: 'grafana-lokiexplore-app/investigation/v1',
} as const;

/* eslint-disable sort/object-properties */
Copy link
Contributor

Choose a reason for hiding this comment

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

This deleted rule made the diff very hard to understand, so it'd be amazing if you can revert these changes after syncing with main 🙏

@NWRichmond NWRichmond force-pushed the metrics/add-extension-point-target-to-link branch from 94ab6c1 to 9121160 Compare July 9, 2025 16:35
Comment on lines -40 to -41
// `plugin.addLink` requires these types; unfortunately, the correct `PluginExtensionAddedLinkConfig` type is not exported with 11.2.x
// TODO: fix this type when we move to `@grafana/data` 11.3.x
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@NWRichmond NWRichmond requested review from matyax and L2D2Grafana July 9, 2025 16:39
@NWRichmond
Copy link
Contributor Author

I rebased onto the latest main and undid the changes related to the now-defunct object sort linting rule. Should be all set!

@gtk-grafana
Copy link
Contributor

@NWRichmond can you add metricsdrilldown to the project-words.txt file? That should get CI passing again

@gtk-grafana gtk-grafana added this to the 1.0.22 milestone Jul 9, 2025
@gtk-grafana
Copy link
Contributor

@NWRichmond also you'll need to resign the CLA, see the comment above, we recycled tokens and now everyone has to re-sign

@NWRichmond
Copy link
Contributor Author

Thank you! Signed ✅

@gtk-grafana gtk-grafana merged commit 8fb4422 into main Jul 9, 2025
26 checks passed
@gtk-grafana gtk-grafana deleted the metrics/add-extension-point-target-to-link branch July 9, 2025 18:53
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.

5 participants