The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Go to file
Giuseppe Guerra a89202eab2
Plugins: Improve instrumentation by adding metrics and tracing (#61035)
* WIP: Plugins tracing

* Trace ID middleware

* Add prometheus metrics and tracing to plugins updater

* Add TODOs

* Add instrumented http client

* Add tracing to grafana update checker

* Goimports

* Moved plugins tracing to middleware

* goimports, fix tests

* Removed X-Trace-Id header

* Fix comment in NewTracingHeaderMiddleware

* Add metrics to instrumented http client

* Add instrumented http client options

* Removed unused function

* Switch to contextual logger

* Refactoring, fix tests

* Moved InstrumentedHTTPClient and PrometheusMetrics to their own package

* Tracing middleware: handle errors

* Report span status codes when recording errors

* Add tests for tracing middleware

* Moved fakeSpan and fakeTracer to pkg/infra/tracing

* Add TestHTTPClientTracing

* Lint

* Changes after PR review

* Tests: Made "ended" in FakeSpan private, allow calling End only once

* Testing: panic in FakeSpan if span already ended

* Refactoring: Simplify Grafana updater checks

* Refactoring: Simplify plugins updater error checks and logs

* Fix wrong call to checkForUpdates -> instrumentedCheckForUpdates

* Tests: Fix wrong call to checkForUpdates -> instrumentedCheckForUpdates

* Log update checks duration, use Info log level for check succeeded logs

* Add plugin context span attributes in tracing_middleware

* Refactor prometheus metrics as httpclient middleware

* Fix call to ProvidePluginsService in plugins_test.go

* Propagate context to update checker outgoing http requests

* Plugin client tracing middleware: Removed operation name in status

* Fix tests

* Goimports tracing_middleware.go

* Goimports

* Fix imports

* Changed span name to plugins client middleware

* Add span name assertion in TestTracingMiddleware

* Removed Prometheus metrics middleware from grafana and plugins updatechecker

* Add span attributes for ds name, type, uid, panel and dashboard ids

* Fix http header reading in tracing middlewares

* Use contexthandler.FromContext, add X-Query-Group-Id

* Add test for RunStream

* Fix imports

* Changes from PR review

* TestTracingMiddleware: Changed assert to require for didPanic assertion

* Lint

* Fix imports
2023-03-28 11:01:06 +02:00
.bingo Chore: Remove apiserver from devenv sources (#64847) 2023-03-15 14:46:35 -04:00
.changelog-archive Changelog: Move to a folder structure for change logs (#50361) 2022-06-08 15:59:47 -05:00
.github Chore: update codeowners with new team name (#65385) 2023-03-27 19:35:23 +03:00
.husky Chore: do not run husky hooks on backend-only changes (#48439) 2022-04-29 14:01:02 +01:00
.vim Chore: Upgrade yarn and editor sdks (#42847) 2021-12-08 14:40:24 +01:00
.vscode Add debug option for Golang tests in vscode (#61983) 2023-01-24 14:44:44 +01:00
.yarn Security: Fixes for CVE-2023-1410 (#65278) 2023-03-23 17:34:05 +01:00
conf Add quota setting for correlations (#65076) 2023-03-21 15:27:25 -05:00
contribute FE Style Guide: Update component definition (#64869) 2023-03-16 09:57:29 +01:00
cue.mod Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
devenv Dashboard: Add value format for requests per minute (#62258) 2023-03-27 16:37:40 +03:00
docs Docs: Add 'tenant_id' for Loki clients (Auditing & Analytics) (#63098) 2023-03-27 22:44:16 +02:00
e2e AzureMonitor: Increase wait for credentials to be ready in E2E test (#64969) 2023-03-17 11:07:08 -05:00
emails Chore: Bump grunt to 1.5.3 (#63209) 2023-02-10 11:18:20 +01:00
grafana-mixin many-to-one requires explicit grouping (#58174) 2023-02-21 11:00:48 +01:00
kinds Chore: Update times in dashboards (#65179) 2023-03-22 15:57:44 +01:00
local Packaging: Dockerfile copy local folder (#64766) 2023-03-14 14:44:11 -05:00
packages [Panel Header - Fullstory]: Make sure new menu's are findable in fullstory (#65167) 2023-03-28 10:20:35 +02:00
packaging Packaging: Start Grafana service after InfluxDB (#64090) 2023-03-08 12:47:11 -05:00
pkg Plugins: Improve instrumentation by adding metrics and tracing (#61035) 2023-03-28 11:01:06 +02:00
plugins-bundled Release: Update versions in package to 9.5.0-pre (#63450) 2023-02-21 08:38:51 +01:00
public [Panel Header - Fullstory]: Make sure new menu's are findable in fullstory (#65167) 2023-03-28 10:20:35 +02:00
scripts CI: Cleanup unnecessary grabpl dependencies (#65330) 2023-03-27 12:55:45 +02:00
tools Image Rendering: Remove PhantomJS support (#23460) 2020-04-15 22:17:41 +02:00
.betterer.results Elasticsearch: Unify adhoc variables processing (#65274) 2023-03-23 17:46:33 +01:00
.betterer.ts Update dependency glob to v9 (#64016) 2023-03-02 12:59:34 +00:00
.bra.toml Chore: Remove redundant codegen step from .bra.tom (#62764) 2023-02-02 14:53:54 +01:00
.browserslistrc Babel: Target more modern browsers, updates browserlistrc (#32573) 2021-04-01 10:32:00 +02:00
.dockerignore copy .github folder into golang build container since we rely on codeowners (#62122) 2023-01-25 10:31:16 -05:00
.drone.star CI: Lint starlark files with buildifier (#59157) 2023-01-30 09:27:11 +00:00
.drone.yml CI: Cleanup unnecessary grabpl dependencies (#65330) 2023-03-27 12:55:45 +02:00
.editorconfig Chore: Enable PR testing in Drone (#26189) 2020-07-10 16:09:21 +02:00
.eslintignore Chore: Align on 'internationalization' for feature name (#52585) 2022-07-21 06:31:08 -04:00
.eslintrc Chore: eslint rule for preventing e2e selectors in aria-label (#59731) 2023-01-18 15:02:35 +00:00
.gitattributes CRLF (#28822) 2020-11-05 17:20:40 +01:00
.gitignore Alerting: QoL improvements to the unified alerting multi-replica devenv (#64907) 2023-03-17 07:14:31 +00:00
.golangci.toml switch from github.com/gofrs/uuid to github.com/google/uuid (#65016) 2023-03-21 06:31:29 -04:00
.linguirc I18n: Change locale format to IETF language tag (#52596) 2022-07-22 10:50:00 -04:00
.nvmrc Chore: Move to node 18 again (#62079) 2023-01-26 10:19:39 +00:00
.pa11yci-pr.conf.js Connections: Turn on feature toggle by default (#64885) 2023-03-22 08:25:35 +01:00
.pa11yci.conf.js A11y: Add Dashboard Settings to Pa11y CI and Refactor local a11y report (#54476) 2022-09-12 15:14:45 +02:00
.prettierignore Swagger: Fix circular reference (#62673) 2023-02-02 13:18:04 +02:00
.prettierrc.js Prettier: Add prettier config that imports prettier from toolkit (#23729) 2020-04-21 17:23:49 +02:00
.yarnrc.yml Update Yarn to v3.4.1 (#62894) 2023-02-07 10:42:28 +00:00
babel.config.json Revert: Babel removal and runtime update (#63641) 2023-02-23 09:22:35 -05:00
build.go Chore: move build command to importable package (#38726) 2021-09-03 11:24:21 -05:00
CHANGELOG.md Changelog: Updated changelog for 9.4.7 (#65292) 2023-03-23 17:41:49 +00:00
CODE_OF_CONDUCT.md Docs: Refactor inconsistent unordered lists (#27826) 2020-10-02 11:02:11 -07:00
CONTRIBUTING.md Docs: Clarify contributions for translations (#55574) 2022-09-27 10:21:23 -04:00
crowdin.yml I18n: Update crowdin config and codeowners (#57264) 2022-10-20 14:59:02 +01:00
Dockerfile Docker: Allow docker-build-full to work for BSD and GNU based systems (#65216) 2023-03-23 12:03:25 -03:00
embed.go extract kindsys to external library (#64562) 2023-03-15 12:04:28 -04:00
go.mod Tracing: Add more detail to HTTP Outgoing Request (#64757) 2023-03-27 13:04:43 +02:00
go.sum Tracing: Add more detail to HTTP Outgoing Request (#64757) 2023-03-27 13:04:43 +02:00
GOVERNANCE.md Chore: Introducing a Grafana HALL_OF_FAME.md (#45878) 2022-05-18 20:13:11 +00:00
HALL_OF_FAME.md Chore: Introducing a Grafana HALL_OF_FAME.md (#45878) 2022-05-18 20:13:11 +00:00
ISSUE_TRIAGE.md ISSUE_TRIAGE.md: update (#60299) 2023-01-19 18:21:36 +01:00
jest.config.js Chore: Bump d3-color to 3.1.0 (#61609) 2023-01-26 13:02:22 +01:00
latest.json Chore: update latest.json to 9.4.7 (#65211) 2023-03-22 17:00:42 +00:00
lerna.json Release: Update versions in package to 9.5.0-pre (#63450) 2023-02-21 08:38:51 +01:00
LICENSE Re-license Grafana to AGPLv3 (#33184) 2021-04-20 19:03:30 +02:00
LICENSING.md Explore: Refactor trace view and move to core (#61938) 2023-01-27 14:13:17 +00:00
MAINTAINERS.md Add Docs maintainers (#51287) 2022-06-22 13:10:30 -07:00
Makefile Docker: Allow docker-build-full to work for BSD and GNU based systems (#65216) 2023-03-23 12:03:25 -03:00
metadata.md Docs: Document plugin authentication in metadata schema (#32703) 2021-04-08 18:13:18 +02:00
NOTICE.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
package.json Security: Fixes for CVE-2023-1410 (#65278) 2023-03-23 17:34:05 +01:00
README.md Docs: Update install guides link in README (#56116) 2022-11-14 11:42:23 +01:00
ROADMAP.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
SECURITY.md Docs: Update RSS feed in security page (#56439) 2022-11-22 10:07:59 +01:00
stylelint.config.js Update dependency stylelint to v14.6.0 (#46626) 2022-03-23 13:40:54 +00:00
SUPPORT.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
tsconfig.json Explore: Refactor trace view and move to core (#61938) 2023-01-27 14:13:17 +00:00
UPGRADING_DEPENDENCIES.md Bump publish docs node version (#46475) 2022-03-11 21:28:12 +01:00
WORKFLOW.md Prettier: Fix all markdown files and add markdown files to CI verify step (#39776) 2021-09-29 14:34:40 +02:00
yarn.lock Dashboards: Unify angular auto-migration code (#63915) 2023-03-27 18:11:45 +03:00

Grafana

The open-source platform for monitoring and observability

License Drone Go Report Card

Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:

  • Visualizations: Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
  • Dynamic Dashboards: Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
  • Explore Metrics: Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
  • Explore Logs: Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
  • Alerting: Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
  • Mixed Data Sources: Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom datasources.

Get started

Unsure if Grafana is for you? Watch Grafana in action on play.grafana.org!

Documentation

The Grafana documentation is available at grafana.com/docs.

Contributing

If you're interested in contributing to the Grafana project:

Get involved

License

Grafana is distributed under AGPL-3.0-only. For Apache-2.0 exceptions, see LICENSING.md.