Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

monitoring: generate panel links, link alerts to correct panel#17014

Merged
bobheadxi merged 5 commits into
mainfrom
grafana-panel-links
Jan 4, 2021
Merged

monitoring: generate panel links, link alerts to correct panel#17014
bobheadxi merged 5 commits into
mainfrom
grafana-panel-links

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jan 2, 2021

Copy link
Copy Markdown
Member

Closes https://github.com/sourcegraph/sourcegraph/issues/16073

  • Monitoring generator now generates a panel ID for generated panels - see observablePanelID for more details
  • Monitoring generator now generates a label for alert metrics containing the relevant panel ID
  • prom-wrapper now generates a link directly to the relevant panel for dashboard links, based on labels
  • Minor refactoring to put generator dashboard helpers in the same file (dashboards.go)

Tested locally with the alert trigger API, link works nicely :)

@codecov

codecov Bot commented Jan 2, 2021

Copy link
Copy Markdown

Codecov Report

Merging #17014 (e5a02eb) into main (60f22af) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main   #17014   +/-   ##
=======================================
  Coverage   52.34%   52.34%           
=======================================
  Files        1701     1701           
  Lines       84204    84207    +3     
  Branches     7766     7726   -40     
=======================================
+ Hits        44073    44079    +6     
+ Misses      36235    36234    -1     
+ Partials     3896     3894    -2     
Flag Coverage Δ
go 51.45% <100.00%> (+<0.01%) ⬆️
integration 29.77% <ø> (+0.01%) ⬆️
storybook 28.86% <ø> (ø)
typescript 54.45% <ø> (+<0.01%) ⬆️
unit 35.19% <ø> (ø)
Impacted Files Coverage Δ
...er-images/prometheus/cmd/prom-wrapper/receivers.go 66.48% <100.00%> (+0.55%) ⬆️
...nal/campaigns/resolvers/changeset_apply_preview.go 58.97% <0.00%> (-0.86%) ⬇️
.../internal/codeintel/resolvers/graphql/locations.go 85.56% <0.00%> (+2.06%) ⬆️
client/web/src/settings/SettingsPage.tsx 76.47% <0.00%> (+11.76%) ⬆️

@bobheadxi bobheadxi marked this pull request as ready for review January 3, 2021 17:21
@sourcegraph-bot

sourcegraph-bot commented Jan 3, 2021

Copy link
Copy Markdown
Contributor

Notifying subscribers in CODENOTIFY files for diff 60f22af...e5a02eb.

Notify File(s)
@slimsag monitoring/monitoring/README.md
monitoring/monitoring/dashboards.go
monitoring/monitoring/monitoring.go
monitoring/monitoring/util.go
@sourcegraph/distribution monitoring/monitoring/README.md
monitoring/monitoring/dashboards.go
monitoring/monitoring/monitoring.go
monitoring/monitoring/util.go

@bobheadxi bobheadxi force-pushed the grafana-panel-links branch from 891a1b3 to 80b3f06 Compare January 3, 2021 17:25
@bobheadxi bobheadxi requested review from a team and tsenart January 3, 2021 17:28

@pecigonzalo pecigonzalo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

@daxmc99 daxmc99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

monitoring: include a link to the exact panel that triggered an alert

4 participants