Commit Graph

11546 Commits

Author SHA1 Message Date
Karl Persson
a2d4ce18ad
IDForwarding: Add basic metrics (#75798)
* IDService: Add basic metrics

* IDService: Add more metrics
---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-10-05 09:17:40 +02:00
Andrew Hackmann
e087a8ab05
Azure monitor/remove graf tracing (#75927)
* trying to remove tracing

* trying to remove tracing

* use plugin sdk tracing

* tracing is not init

* add infra tracing back

* remove infra trace

* Update pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>

* pr feedback

* remove code from other pr

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-10-05 02:38:26 +03:00
Todd Treece
d9160553f9
K8s: Remove /k8s/ prefix (#75959) 2023-10-04 14:05:50 -04:00
Yuri Tseretyan
5be52dfe21
Alerting: Fix store's GetNamespaceByUID (#75976) 2023-10-04 13:13:31 -04:00
Gabriel MABILLE
13a10b9bf0
Chore: Clean up the context handler (#75864)
* Chore: Clean up the context handler

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* Better comment

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

---------

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2023-10-04 17:56:51 +02:00
Jo
69b2442a0d
Anon: Use xorm for anon service (#75964)
use xorm for anon service
2023-10-04 17:19:56 +02:00
ismail simsek
2d603bed22
InfluxDB SQL: Add time filter automatically (#75953)
* Use double quotes instead of backticks

* render time field as datetime

* add @react-awesome-query-builder/core

* Add time range filtering

* Update test

* Update macro test
2023-10-04 17:00:24 +02:00
Gabriel MABILLE
193ec8de2b
AuthN: Move oauthserver to extsvcauth (#75972)
* AuthN: Move oauthserver to extsvcauth

* Codeowners
2023-10-04 16:53:17 +02:00
Oscar Kilhed
40cdb30336
Transformations: Add support for dashboard variable in limit, sort by, filter by value, heatmap and histogram (#75372)
* variables for filterforvalue

* use datalinkinput for basic matcher

* fix user select issue

* heatmap transformation variable interpolation

* clean code

* interpolate sort by

* add options interpolation in histogram transformation

* interpolation for limit

* Add suggestions UI to Filter by data value Transformation

Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>

* add validation for number/variable fields

* Add variables to add field from calculation

* Add validator to limit transformation

* Refactor validator

* Refactor suggestionInput styles

* Add variable support in heatmap calculate options to be in sync with tranform

* Refactor SuggestionsInput

* Fix histogram, limit and filter by value matchers

* clean up weird state ref

* Only interpolate when the feature toggle is set

* Add feature toggle to ui

* Fix number of variable test

* Fix issue with characters typed after opening suggestions still remains after selecting a suggestion

* Clean up from review

* Add more tests for numberOrVariableValidator

---------

Co-authored-by: Victor Marin <victor.marin@grafana.com>
2023-10-04 17:28:46 +03:00
Karl Persson
09e638cd9d
IDForwarding: Use feature toggle not generate a key if feature is not enabled (#75961)
* Use feature toggle not generate a key if feature is not enabled

* Fix check
2023-10-04 16:06:24 +02:00
Jo
d494f69660
SigningKeys: Use xorm for signing_key store (#75957)
use xorm form signing_key store
2023-10-04 15:28:12 +02:00
Horst Gutmann
9813d17e93
Expose enterprise-commit in server version output (#75897)
* Expose enterprise-commit in server version output

* Define a DefaultCommitValue constant
2023-10-04 14:51:35 +02:00
Jo
44fa0697ce
Auth: Signing Key persistence (#75487)
* signing key wip

use db keyset storage

add signing_key table

add testing for key storage

add ES256 key tests

Remove caching and implement UpdateOrCreate

Stabilize interfaces

* Encrypt private keys

* Fixup signer

* Fixup ext_jwt

* Add GetOrCreatePrivate with automatic key rotation

* use GetOrCreate for ext_jwt

* use GetOrCreate in id

* catch invalid block type

* fix broken test

* remove key generator

* reduce public interface of signing service
2023-10-04 10:37:27 +02:00
Sofia Papagiannaki
0eac9aff7f
Nested Folders: Fix fetching a folder by title (#74725)
Modify folder store Get() to consider folder parent
2023-10-04 11:19:22 +03:00
Carl Bergquist
0fc403d116
Instrumentation: Enable native histograms for HTTP requests (#75731)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-10-03 20:23:55 +02:00
Horst Gutmann
965c1de1f2
Fix: visualization vs visualisation in feature description (#75895) 2023-10-03 17:43:27 +03:00
Marcus Efraimsson
e4c1a7a141
Tracing: Standardize on otel tracing (#75528) 2023-10-03 14:54:20 +02:00
Carl Bergquist
3c8cea0764
instrumentation: rename team to grafana_team to improve alert routing. (#75860)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-10-03 12:25:01 +02:00
Giuseppe Guerra
cc9a4aa203
Plugins: Logger middleware: Fix wrong endpoint name for CheckHealth (#75873)
Plugins: Logger middleware: fix wrong endpoint name for CheckHealth
2023-10-03 13:13:06 +03:00
Karl Persson
770b52b02b
DatasourceProxy: Fix spelling (#75859)
* Fix spelling

---------

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-10-03 10:23:23 +02:00
Yuri Tseretyan
027bd9356f
Alerting: Rule Modify Export APIs (#75322)
* extend RuleStore interface to get namespace by UID
* add new export API endpoints
* implement request handlers
* update authorization and wire handlers to paths
* add folder error matchers to errorToResponse
* add tests for export methods
2023-10-02 11:47:59 -04:00
gotjosh
e877174501
Alerting: Expose metrics for Alertmanager Alerts - grafana_alerting_alertmanager_alerts (#75802)
* Alerting: Expose metrics for Alertmanager Alerts

In Grafana, the alert evaluation and alert delivery are combined. We're always used a metric named `grafana_alerting_alerts` to get a sense of what are the alerts that are currently firing (these come from the evaluation side) and opted to not map the alertmanager alerts metric directly.

I think it's important that we make a disction between alerts that happen at evaluation vs alerts that are received for delivery by the internal Alertmanager as we have options to skip the delivery of these alerts to the internal alertmanager altogether.
2023-10-02 16:36:23 +01:00
George Robinson
ed7d29f2b9
Alerting: Migrate old alerting templates to Go templates (#62911)
* Migrate old alerting templates to use $labels

* Fix imports

* Add test coverage and separate rewriting to Go templates

* Fix lint

* Check for additional closing braces

* Add logging of invalid message templates

* Fix tests

* Small fixes

* Update comments

* Panic on empty token

* Use logtest.Fake

* Fix lint

* Allow for spaces in variable names by not tokenizing spaces

* Add template function to deduplicate Labels in a Value map

* Fix behavior of mapLookupString

* Reference deduplicated labels in migrated message template

* Fix behavior of deduplicateLabelsFunc

* Don't create variable for parent logger

* Add more tests for deduplicateLabelsFunc

* Remove unused function

* Apply suggestions from code review

Co-authored by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>

* Give label val merge function better name

* Extract template migration and escape literal tokens

* Consolidate + simplify template migration

---------

Co-authored-by: William Wernert <william.wernert@grafana.com>
2023-10-02 11:25:33 -04:00
Karl Persson
88347774fb
DatasourceProxy: Set feature field (#75830)
Set feature feild
2023-10-02 18:06:22 +03:00
Agnès Toulet
23c61fa785
Chore: Replace gofpdf (#75805)
* Chore: Replace gofpdf

* Update main.go

* Add code owner

* update gofpdf
2023-10-02 15:32:35 +02:00
Marcus Efraimsson
69ce0486a2
Testdata: Add some tracing to testdata query data handling (#75762) 2023-10-02 13:03:17 +02:00
Santiago
73be9449d1
Alerting: Manage remote Alertmanager silences (#75452)
* Alerting: Manage remote Alertmanager silences

* fix typo

* check errors when encoding json in fake external AM

* take path from configured URL, check for nil responses
2023-10-02 07:36:11 -03:00
Karl Persson
684d68365e
IDforwarding: forward signed id to plugins (#75651)
* Plugins: Add client middlware that forwards the signed grafana id token if present

* DsProxy: Set grafana id header if id token exists

* Add util function to apply id token to header

* Only add id forwarding middleware if feature toggle is enabled

* Add feature toggles to ds proxy and check if id forwarding is enabled

* Clean up test setup

* Change to use backend.ForwardHTTPHeaders interface

* PluginProxy: Forward signed identity when feature toggle is enabled

* PluginProxy: forrward signed id header
2023-10-02 09:14:10 +02:00
Andre Pereira
1ce603b9e9
Tempo: TraceQL results as a spans list (#75660)
* Format tempo search results as spans

* Thank you test
2023-09-29 20:34:39 +03:00
Dimitris Sotirakis
c08606d2c5
Bug: Exclude 32-bit arm builds (#75448)
* Exclude 32 bit arm builds

# Conflicts:
#	pkg/build/config/versions.go

* Bump grabpl - remove arm/v7 from build.star

# Conflicts:
#	.drone.yml
2023-09-29 12:33:01 -05:00
Ryan McKinley
010b2461b9
Plugins: Move alias support to plugin json (but still hardcoded) (#75129) 2023-09-29 08:20:37 -07:00
Carl Bergquist
a39d2ae8ea
instrumentation: change slogroup for alerting handlers to high-slow (#75460)
instrumentation: change slogroup for alerting handlers to high-fast

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-09-29 14:56:48 +02:00
Andreas Christou
5796836662
Azure: Add support for Workload Identity authentication (#75681)
* Update Azure Monitor

* Update Prometheus

* Update README

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/_index.md

Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>

* README updates

* Fix prettier

* memoize options

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Beverly <131809838+BeverlyJaneJ@users.noreply.github.com>
2023-09-29 12:35:11 +03:00
Karl Persson
7a38090bc0
AuthN: Fix namespaces for anonymous and render (#75661)
* AuthN: remove IsAnonymous from identity struct and set correct namespace for anonymous and render

* Don't parse user id for render namespace
2023-09-29 09:10:33 +02:00
Joseph Perez
0e2b741fc3
Docs: Remove old plugin docs, fix URLs to go to new dev portal (#75325)
* Remove old plugin docs, add redirects to new dev portal

* Restore plugin.schema.json file

* Update docs/sources/administration/plugin-management/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* More updates

* Cleanup links

* Update docs/sources/alerting/fundamentals/evaluate-grafana-alerts.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* fix codeowners

* Change reference links to inline links to avoid 404s

* Update docs/sources/datasources/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/mysql/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/fundamentals/timeseries-dimensions/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/fundamentals/dashboards-overview/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/fundamentals/dashboards-overview/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/panels-visualizations/configure-standard-options/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Remove grafana.com from 2 URLs

* Fix 1 more reference link

* Prettier fix

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-29 07:43:48 +01:00
Todd Treece
c31ddce0b6
K8s: Add org ID and role authorizers (#75701) 2023-09-28 18:28:58 -04:00
Ryan McKinley
0af7247612
Chore: cleanup old dashboardPreviews files (#75682) 2023-09-28 13:31:07 -07:00
Sarah Zinger
b83a58ef55
Cloudwatch: Prevent log group requests with ARNs if feature flag is off (#75672) 2023-09-28 14:25:03 -04:00
Isabella Siu
ac3fe55d17
CloudWatch Logs: Make monaco query editor general availability (#75589) 2023-09-28 14:00:38 -04:00
Ivana Huckova
c40bc0665b
Elasticsearch: Add instrumentation for elasticsearch_plugin_parse_response_duration_seconds (#75628)
* Elasticsearch: Add instrumentation for elasticsearch_plugin_parse_response_duration_seconds

* Update error tracking
2023-09-28 18:38:14 +03:00
Ivana Huckova
5510a0d8d1
Loki: Add instrumentation for grafana_loki_plugin_parse_response_duration_seconds_bucket (#75570)
* Add metric for loki parsing response duration

* Rename and add exemplars

* Fix lint
2023-09-28 17:25:09 +02:00
Gabriel MABILLE
6ffd4a23de
Team: Support sort query param for teams search endpoint (#75622)
* Teams: Implement backend sorting

* Add docs

* Make name ordering case insensitive

* lint

* Fix no lowercasing on memberCount

* Add test to double check the filters or correctly OrderBy
2023-09-28 18:20:51 +03:00
Karl Persson
fd2235b5ad
AuthN: Implement requester interface for identity (#75618)
* AuthN: Implement identity.Requester interface for authn.Identity

* AuthN: Replace OrgRole with GetOrgRole

* IDForwarding: skip converting to SignedInUser

* Pass identity directly in permission sync hook
2023-09-28 16:37:32 +02:00
Sonia Aguilar
169c5262a5
Alerting: Add Modify export feature for Grafana-managed alert rules (#75114)
* Initial POC for modified rule expor

* Add rule and group export options to modified export

* Add feature toggle for modifier export

* Rename GrafanaRuleDesigner to ModifyExportRuleForm to identify it easily as a rule form

* Refactor naming and folder for RuleDesigner => ModifyExport

* Don't render more action drop-down button when no more actions are allowed

* Redirect cancel button to alert list view

* Fix modify export page being reloaded correctly without errors

* Fix test

* Protect modify-export route when toggle-feature is not enabled

* Fix css betterer error

* Address pr review coments

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2023-09-28 16:07:45 +02:00
Orgad Shaneh
b0b2158dea
Chore: Update ubuntu image to 22.04 (#70719) 2023-09-28 08:48:41 -05:00
Sergey Kostrukov
3ee40d3a5a
Azure: Settings for Azure AD Workload Identity (#75283)
* Settings for Azure AD Workload Identity

* Update dependency on Grafana Azure SDK

* Documentation

* Fix JS code

* Cleanup Prometheus backend code

* Making prettier happy
2023-09-28 12:05:16 +01:00
Gabriel MABILLE
969e6a17ba
Plugins: Rename oauth package to auth (#75611)
* Plugins: Rename oauth package to auth

* Missed one comment
2023-09-28 12:18:09 +02:00
Gabriel MABILLE
96cbe70b14
User: Support sort query param for user and org user, search endpoints (#75229)
* User: Add sort option to user search

* Switch to an approach that uses the dashboard search options

* Cable user sort on the org endpoint

* Alias user table with u in org store

* Add test and cover orgs/:orgID/users/search endpoint

* Add test to userimpl store

* Simplify the store_test with sortopts.ParseSortQueryParam

* Account for PR feedback

* Positive check

* Update docs

* Update docs

* Switch to ErrOrFallback

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-09-28 10:16:18 +02:00
Gabriel MABILLE
4563fc48af
FeatureToggle: Add a feature toggle for automatic service account and token setup (#75560)
Add a feature toggle for automatic service account and token setup
2023-09-28 09:26:37 +02:00
Karl Persson
b9b4246432
IDForwarding: Add auth hook to generate id token (#75555)
* AuthN: Move identity struct to its own file

* IDForwarding: Add IDToken property to usr and identity structs and add GetIDToken to requester interface

* Inject IDService into background services

* IDForwarding: Register post auth hook when feature toggle is enabled
2023-09-28 09:22:05 +02:00
Sofia Papagiannaki
3a1c3be057
Chore: Log failures during provisioning initialization (#75550)
Provisioning: Log failures
2023-09-28 10:00:36 +03:00
Daniel Lee
33a32df47b
imagestorage: fix templating of public_url option for webdav (#74885)
* spelling in error message

* imguploader: fix template for webdav url

Since a few years ago, when loading the config file, the  template gets replaced in the expanding
env var phase (see ##25075) and introduced a bug in the webdav public_url config option. This commit
changes the template syntax to be {{file}}. This doesn't get expanded and removed when the config file
is loaded.

* devenv: add a block for a WebDAV server

* Adding alerting as codeowners for webdav

---------

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2023-09-28 00:35:10 +03:00
Ryan McKinley
bbdd1fc3b1
Playlist: Remove unused/deprecated api and unused wrapper (#75503) 2023-09-27 15:28:16 +00:00
Isabella Siu
06a35f55ac
CloudWatch: Correctly add dimension values to labels (#74847)
Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2023-09-27 10:41:48 -04:00
Karl Persson
b50f1e15a8
IDForwarding: Add service and a local signer (#75423)
* IDForwarding: Add service for handling id token and create a local signer
---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-09-27 11:36:23 +02:00
Gabriel MABILLE
0ed649b108
AuthN: Change EnableDisabledUserHook to EnableUserHook (#75248)
* Replace the enable disable user hook by a hook that systematically enable users

* Fix tests

* Remove the skip test
2023-09-27 11:16:53 +02:00
Marcus Efraimsson
0128d0403f
Tracing: Use tracing.InitializeTracerForTest (#75479) 2023-09-27 09:51:57 +02:00
Andres Martinez Gotor
af8a46adbb
Bug Fix: Restore health check error (#75508) 2023-09-27 10:44:43 +03:00
Todd Treece
bb9e66e671
K8s: Add storage dual writer (#75403) 2023-09-26 17:15:15 -04:00
Carl Bergquist
8d62ed77f0
instrumentation: set slogroup high-fast for more handlers (#75449)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-09-26 19:11:29 +02:00
Kevin Minehart
edc36d3948
CI: check /tmp/grafana-enterprise; don't fail if rev-parse fails (#75480)
check /tmp/grafana-enterprise; don't fail if rev-parse fails
2023-09-26 20:09:18 +03:00
Yuri Tseretyan
237ce5ea82
Alerting: Extract methods for fetching rule groups with authorization (#75375)
* extract methods for fetching rule groups with authorization and refactor the request handlers.
* add logging to delete handler
2023-09-26 12:45:22 -04:00
Dimitris Sotirakis
1867fc5cee
Arm: Exclude armv6/v7 from downstream builds only (#75465)
* Bump grabpl

* Disable armv6 and armv7 in downstream builds
2023-09-26 18:42:06 +03:00
Andres Martinez Gotor
c129c0cd39
Chore: Allow to compile testdata backend as a plugin (#75360) 2023-09-26 15:30:25 +02:00
Marcus Efraimsson
534e3ebf0c
Plugins: Use a Grafana specific SDK tracer implementation for core plugins (#75388) 2023-09-26 14:46:31 +02:00
Giordano Ricci
1aa911dee6
Correlations: improve test (#75370)
* Correlations: improve test

* re-add err check
2023-09-26 12:21:24 +01:00
Todd Treece
440f9a6ffb
K8s: Register apiserver as background service, and list real playlists (#75338)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-09-25 15:31:58 -07:00
Sijmen
60922e5f77
Cloudwatch: Add missing AWS regions (#75392) 2023-09-25 17:13:46 -04:00
Kat Yang
9532ff3799
Chore: Split OSS and Enterprise OAPI Spec Generation (#75133)
* chore: implement sofia makefile changes from #62456

* chore: clean up makefile and generate specs

* docs: update command to delete old specs

* fix: regenerate specs with enterprise linked

* chore: implement review comments

* Update Makefile

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* chore: update make command in drone step

* chore: update bingo, fix makefile indentation error, regen specs

* fix: revert .bingo/README changes to make prettier happy

* chore: add BEP as owners of api-enterprise-spec.json

* chore: rerun drone

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-09-25 15:34:57 -04:00
Sarah Zinger
ef441f02d0
Cloudwatch: Fix Unexpected error (#74420)
Fix unexpected error when creating a new cloudwatch datasource.

Involves a fair amount of refactoring, so if this causes unexpected issues related to region fetching we can turn this off with the cloudwatchNewRegionsHandler feature toggle, although we do not predict it will so we are enabling it to default to true and hope to remove it shortly.
2023-09-25 14:19:12 -04:00
João Calisto
7e1b45ba31
Feature Toggles API: Trigger webhook call when updating (#75254)
* Feature Toggles API: Trigger webhook call when updating

* update status code error check

* lint - handle Close() error

* Rename update webhook config

* fix tests
2023-09-25 19:11:24 +01:00
Karl Persson
d15661c726
IDForwarding: Add toggle for id forwarding (#75378)
Features: Add toogle for id forwarding
2023-09-25 18:21:28 +03:00
Jo
40a1f8434d
Anon: Scaffold anon service (#74744)
* remove API tagging method and authed tagging

* add anonstore

move debug to after cache

change test order

fix issue where mysql trims to second

* add old device cleanup

lint

utc-ize everything

trim whitespace

* remove dangling setting

* Add delete devices

* Move anonymous authnclient to anonimpl

* Add simple post login hook

* move registration of Background Service

cleanup

* add updated_at index

* do not untag device if login err

* add delete device integration test
2023-09-25 16:25:29 +02:00
Andres Martinez Gotor
ece94b1e01
Chore: Remove plugincontext.ErrPluginNotFound (#74997) 2023-09-25 13:10:47 +03:00
Andres Martinez Gotor
1714fa598c
Chore: Refactor backend plugin errors (#74928) 2023-09-25 11:56:03 +02:00
gotjosh
59694fb2be
Alerting: Don't use a separate collection system for metrics (#75296)
* Alerting: Don't use a separate collection system for metrics

The state package had a metric collection system that ran every 15s updating the values of the metrics - there is a common pattern for this in the Prometheus ecosystem called "collectors".

I have removed the behaviour of using a time-based interval to "set" the metrics in favour of a set of functions as the "value" that get called at scrape time.
2023-09-25 10:27:30 +01:00
Ryan McKinley
e72b5c54f8
K8s/Playlist: Isolate apiGroup from server (#75321) 2023-09-22 18:29:43 -07:00
Todd Treece
0f398e940d
K8s: Playlist API example (#75260)
K8s: Playlist example
2023-09-22 14:17:53 -04:00
ismail simsek
a64bfdfb94
InfluxDB SQL: Provide raw query preview for query history (#75030)
* log the sql query

* render the raw sql

* Update rawQuery

* unit tests
2023-09-22 17:40:18 +02:00
Andres Martinez Gotor
c70623fb85
Chore: Rename testdata plugin with a fully qualified name (#75104) 2023-09-22 15:00:40 +03:00
Will Browne
d6db9eaeb2
Plugins: Make sure feature toggles config value is deterministic (#75249)
* make sure feature toggle config vals are deterministic

* fix nil pointer

* undo changes

* fix condition

* add tests
2023-09-22 13:56:48 +02:00
Ezequiel Victorero
4cfc834c08
HealthCheck: show enterprise commit (#75242) 2023-09-22 08:17:10 -03:00
George Robinson
15f6e8a500
SQLStore: Fix race condition in RecursiveQueriesAreSupported (#75274) 2023-09-22 11:30:14 +01:00
Carl Bergquist
e5fbc4a4cd
web: add slo group to request meta (#74765)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-09-22 11:52:28 +03:00
Andres Martinez Gotor
61cdfba87a
Feature: Allow to load a core plugin as external (#75157) 2023-09-22 10:50:13 +02:00
William Wernert
925f12d0ea
Alerting: Add support for keep_firing_for field from external rulers (#75163)
* Add support for `keep_firing_for` in ruler proxy

* Don't delete `keep_firing_for` when editing a rule with the field set

Co-Authored-By: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>

---------

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2023-09-21 16:02:53 -04:00
Juan Cabanas
633605af4e
PublicDashboards: Refresh ds plugin supported list (#74947) 2023-09-21 16:24:08 -03:00
Todd Treece
71fe6f8390
Live: Add logging to memory cache (#75245) 2023-09-21 12:59:01 -04:00
Will Browne
de2a107efa
Chore: Fix slug cfg name (#75235)
fix cfg name
2023-09-21 15:59:49 +03:00
Will Browne
e9e0e321b6
Chore: Add stack ID + slug to cfg (#75227)
* add stack ID + slug to cfg

* add to environment section
2023-09-21 14:45:43 +02:00
Esteban Beltran
8e8bd2760b
Plugins: Report plugin utilization of Grafana runtime dependencies (#75156)
* Plugins: Report plugin utilization of Grafana runtime dependencies

* Change approach to determine pluginName too

* Fix tests

* Update tests

* remove commented code
2023-09-21 13:36:32 +02:00
Kyle Brandt
b87279b8d8
Prometheus: Fix creation of invalid dataframes with exemplars (#75187)
for #73654
2023-09-21 07:30:14 -04:00
Will Browne
7fca1bde54
Plugins: Set grafana config, plugin version and user agent on plugin requests (#75171)
* first pass

* fixup

* remove test line

* fix tests

* use new fields

* fix imports + formatting

* fix tests

* rollback changes

* undo whitespace

* apply pr feedback
2023-09-21 11:33:31 +02:00
Andres Martinez Gotor
dd8f88b194
Chore: Remove lint exceptions from testdata backend (#75148) 2023-09-21 10:39:28 +02:00
Gabriel MABILLE
c8149d50f9
LDAP: FIX Enable users on successfull login (#75073)
* LDAP: Enable users on successfull login

* Force enable ldap users on successful login

* Fix tests

* Fix tests
2023-09-20 17:26:50 +02:00
Andrej Ocenas
15e54df9f2
Pyroscope: Remove "phlare" from variable, types, strings etc (#75140) 2023-09-20 16:31:22 +02:00
Steve Simpson
894f420014
Alerting: Pass loggers into SchedulerCfg and ManagerCfg. (#75158) 2023-09-20 15:07:02 +02:00
Carl Bergquist
764478b9e7
Instrumentation: Set auth as owners for more routes (#75105)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-09-20 10:18:52 +02:00
Todd Treece
4f06d362df
Chore: Add additional debug info to live websocket pushes (#75131) 2023-09-19 19:33:23 -04:00
Deepali Gupta
b54e4c0ddb
Chore: Update metrics for AWS/MediaConnect (#74946) 2023-09-19 13:35:16 -04:00
Kyle Brandt
0e2ddf9864
Toggle: Enable Recorded Queries Multi support by default (#75097)
* Toggle: Enable Recorded Queries Multi support by default
2023-09-19 10:51:23 -04:00
Travis Patterson
98aa7db64a
Loki: Run queries in parallel behind lokiRunQueriesInParallel feature toggle (#74064)
* issue loki queries in parallel so total query time is only the slowest query rather than the sum of all query times.

* Fix lint

* Add running of queries in parallel behind feature toggle to test the functonality before release

* Add span end

* Move shared logic to separate function

* Add logging and tracing around running of all queries

---------

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2023-09-19 12:34:01 +03:00
Sven Grossmann
727c83d562
Loki: Improve error logging in case statusCode is not 200 (#75075)
* improve loki logging

* fix error log

* fix logger arg
2023-09-19 11:11:27 +02:00
Andrej Ocenas
f7aab06e23
Pyroscope: Remove support for old pyroscope (#74683) 2023-09-19 10:09:28 +02:00
Andreas Christou
b779ce5687
AzureMonitor: Improve Log Analytics query efficiency (#74675)
* Promisify loading schema

- Move schema loading to LogsQueryEditor
- Improve typing
- Switch callbacks to promises

* Update types

* Refactor backend for new props

- Rename intersectTime
- Support setting timeColumn
- Add additional properties to logs request body

* Update applyTemplateVariables

* Update set functions

* Add new TimeManagement component

* Update LogsQueryEditor

* Hardcode timestamp column for traces queries

* Ensure timeColumn is always set for log queries

* Update tests

* Update frontend tests

* Readd type to make migration easier

* Add migration

* Add fake schema

* Use predefined type

* Update checks and defaults

* Add tests

* README updates

* README update

* Type update

* Lint

* More linting and type fixing

* Error silently

* More linting and typing

* Update betterer

* Update test

* Simplify default column setting

* Fix default column setting

* Add tracking

* Review

- Fix typo on comment
- Destructure and remove type assertion
- Break out await into two variables
- Remove lets and rename variable for clarity
2023-09-18 18:38:39 +01:00
Laura Fernández
0ceeb18269
Navigation: Create feature toggle for dockedMegaMenu (#74985) 2023-09-18 12:57:11 +02:00
Giuseppe Guerra
322fde1f5b
Plugins: Angular: Removed getLegacyAngularInjector Angular pattern (#74862)
Plugins: Angular: Removed getLegacyAngularInjector angular pattern
2023-09-18 11:50:45 +02:00
Horst Gutmann
85abf2bebd
Chore: Upgrade Alpine base image to 3.18.3 (#74984) 2023-09-18 12:44:04 +03:00
Ivana Huckova
4f0b31d21b
Elasticsearch: Add tracing to data source (#74750)
* Elasticsearch: Add tracing do data source

* Fix tests

* Address feedback

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Track error across both spans

* Add span for decoding of response

* Fix test

* Update setting of errors + fix test

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-09-18 10:49:12 +02:00
Torkel Ödegaard
401ec3c4b0
DashboardScene: Meta data tab (#74810)
* DashboardScene: Inspect meta tab

* DashboardScene: Inspect meta tab

* fix casing

* Added meta data inspector to testdata data source
2023-09-18 09:00:59 +02:00
Yuri Tseretyan
40c12c17bf
SSE: Reduce to add warning notice to only the first result (#74940) 2023-09-15 11:07:17 -04:00
Sven Grossmann
9328fda8ea
Logging: Add uname to context logger for plugins (#74929)
add `uname` to context logger for plugins
2023-09-14 20:23:01 +03:00
Yuri Tseretyan
68eda133e4
SSE: Reduce to apply Mode to instant vector (mathexp.Number) (#74859) 2023-09-14 12:26:00 -04:00
Sven Grossmann
aaef8d3b40
Loki: Add query expression to backend logging (#74927)
add query expression to loki log
2023-09-14 17:23:02 +02:00
Virginia Cepeda
5d88b8a4f5
[Alerting Insights] - Use Grafana feature flag system (#74749)
Use Grafana feature flag system
2023-09-14 09:58:04 -03:00
Santiago
8c1a3f75f9
Alerting: Add empty remote Alertmanager struct (#74864)
* Alerting: Add empty remote alertmanager struct

* Update pkg/services/ngalert/notifier/external_alertmanager.go

Co-authored-by: gotjosh <josue.abreu@gmail.com>

---------

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2023-09-14 08:55:01 -03:00
Andres Martinez Gotor
96b55ea37c
Feature: Allow to skip plugin loading (#74840) 2023-09-14 12:58:12 +02:00
Andre Pereira
dc44ac7b78
Tempo: Added spss config - spans per span set (#74832)
* Added spss config - spans per span set

* Set default spss when calling Tempo
2023-09-14 10:49:18 +01:00
linoman
c4bc90ff5b
Chore: Add const variables for No Basic Role (#74868)
* Add const variables for No Basic Role
2023-09-14 11:42:07 +02:00
Karl Persson
cebae4fb9a
Requester: Update GetCacheKey (#74834)
* AuthN: re-export all namespaces

* Identity: Change signature of GetCacheKey

* User: check HasUniqueID

* Default to org role None if role is empty
2023-09-14 09:19:33 +02:00
Isabella Siu
4b7b323061
CloudWatch Logs: Fix log query display name when used with expressions (#74497) 2023-09-13 15:04:50 -04:00
Carl Bergquist
2d8f5c1488
featuremgmt: add internal testing feature flag (#74873)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-09-13 21:32:01 +03:00
Kyle Brandt
35e488b22b
SSE: Localize/Contain Errors within an Expression (#73163)
Changes SSE to not always fail all queries when one fails. Now only the query itself, and nodes that depend on it will error.
---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-09-13 13:58:16 -04:00
Giuseppe Guerra
7b75bc6999
Plugins: Angular detector: Log detection patterns at debug level (#74802)
* Plugins: Angular detector: Log detection patterns at debug level

* Add tests
2023-09-13 18:35:21 +02:00
Pierre Baumard
81551a4cb4
Chore: ErrOrgNameTaken error at org insert instead of SQL error (#69325)
* Add ErrOrgNameTaken check to org insert

* Add tests for ErrOrgNameTaken
2023-09-13 16:42:19 +02:00
Gabriel MABILLE
729f9a01a0
RBAC: Fix search user permissions (#74729)
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-09-13 15:19:19 +02:00
Piotr Jamróz
946da57b6a
Correlations: Allow creating correlations for provisioned data sources (#73737)
* Allow creating correlations for provisioned data sources

* Update docs

* Fix linting

* Add missing props

* Add missing props

* Fix linting

* Fix linting

* Clarify error name

* Removed error handling for a non-existing use case

* Create a list of deleted data datasources based on all configs

* Add org_id to correlations

* Add tests

* Allow org_id to be null in case org_id=0 is used

* Create organization to ensure stable id is generated

* Fix linting

* Ensure backwards compatibility

* Add deprecation information

* Update comments

* Override existing datasSource variable so the UID is retrieved correctly

* Migrate correlations indices

* Default org_id when migrating

* Remove redundant default

* Make PK non-nullable

* Post merge fixes

* Separate data sources / correlations provisioning

* Adjust comments

* Store new data sources in spy store so it can be used to test correlations as well

* Fix linting

* Update tests

* Ensure response is closed

* Avoid creating duplicates during provisioning

* Fix updating provisioned column and update tests

* Rename error message

* Fix linting errors

* Fix linting errors and rename variable

* Update test

* Update pkg/services/sqlstore/migrations/correlations_mig.go

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Remove unused error

* Fix lining

---------

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-09-13 15:10:09 +02:00
Jean-Philippe Quéméner
f3b6d01306
feat(alerting): enable loki query optimization by default (#74739) 2023-09-13 13:52:40 +02:00
Eric Leijonmarck
b00f3216c1
Auth: Refactor for revoking user tokens within last hours (#74616)
* fix: revoked tokens within last hours

adds check for unlimited sessions out of index
adds a function for specifing the hours to look back when revoking users tokens, otherwise we "assume" the clean up takes care of them adds a index for the `user_auth_token` - `revoked_at` for faster queries when using `revoked_at`

* fix: sqllite datetime conversion with unixtimestamps

* fix: postgres dialect

* fix: mysql dialect

* fix: mysql dialect missing closing )

* refactor: delete revoked tokens directly

* fix: tests for sqlite

* AuthToken: Simplify DeleteUserRevokedTokens and add test

* fix: linting newline

* Reset get time after test

* fix: test order by revoked

* fix: order by different db

* ascending

* test with seen at

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-09-13 10:24:37 +01:00
Stephanie Hingtgen
bb2f5fce07
Secure socks proxy: Allow overriding socks username (#74762) 2023-09-12 13:07:41 -06:00
Ezequiel Victorero
733044ee4b
PublicDashboards: Return no data found instead of internal server error (#74417) 2023-09-12 20:59:28 +03:00
Giuseppe Guerra
e9a12598db
Plugins: Angular patterns: Use ETag for GCOM requests (#74453)
* Plugins: Dynamic angular patterns: Send If-None-Match to GCOM, store ETag

* Fix SetETag settings the wrong key in underlying kvstore

* Fix wrong type in GCOMResponse.Patterns and wrong content being saved

* Fix ctx passing to GetETag in background job

* Added more ETag tests

* More ETag tests

* Set last updated and log when not modified is returned

* Fix missing in-memory detectors update when etag matches, add comments

* Fix mutex usage
2023-09-12 18:03:57 +02:00
Marcus Efraimsson
f70990d8eb
Plugins: Refactor instrumentation to logger middleware (#74726) 2023-09-12 17:33:48 +02:00
Nutmos
ad9f0b9e4e
Alerting: Add message options for Telegram contact point (#74635)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2023-09-12 10:45:57 -04:00
Sofia Papagiannaki
376f9a75db
Folders: Do not allow modifying the folder UID via the API (#74684)
* Folders: Do not allow changing the folder UID via the API

* Update Swagger/OpenAPI docs

* Update HTTP API docs
2023-09-12 14:28:33 +03:00
Andrej Ocenas
e4f26a5e4b
Flamegraph: Move to package (#73113) 2023-09-12 12:28:48 +02:00
Polina Boneva
b14263af45
Dashboard: Remove old panel code and leave only new panel design (#74196)
* delete PanelHeader

* PanelHeaderMenuItem is only used in PageHeader

* PanelHeaderCorner only used by PanelEditorTableView

* PanelHeaderMenuTrigger not used anywhere

* PanelHeaderMenuWrapperNew is PanelHeaderMenuWrapper, old one is deleted

* remove newPanelChromeUI from test

* delete feature flag newPanelChromeUI

* PanelHeaderMenuWrapperNew is PanelHeaderMenuWrapper, old one is deleted
2023-09-12 11:54:41 +03:00
Andres Martinez Gotor
1a8a19a9ed
Chore: Avoid stopping plugin (#74654) 2023-09-12 10:34:12 +02:00
Yuri Tseretyan
6f785f7269
Alerting: Support for single rule and multi-folder rule export (#74625) 2023-09-11 13:13:02 -04:00
Brendan O'Handley
a2e2ba695e
Prometheus: Turn new auth component feature toggle on by default (#74405)
* turn auth feature toggle on by default

* fix e2e test

* fix e2e test

* fix e2e test
2023-09-11 13:12:21 -04:00
Dave Henderson
ce1169f8b7
Tracing: Support remote, rate-limited, and probabilistic sampling in tracing.opentelemetry config section (#73587)
* tracing: Support remote sampling server

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

* Update docs/sources/setup-grafana/configure-grafana/_index.md

* Update docs/sources/setup-grafana/configure-grafana/_index.md

* Satisfying the doc-validator check

* satisfy prettier

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* back out unnecessary change

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-09-11 12:13:29 -04:00
Bryan Huhta
0f552053e9
Pyroscope: add public catalog description (#74630)
* Add readme

* Fix wrong link

* Update public/app/plugins/datasource/grafana-pyroscope-datasource/README.md

Co-authored-by: Dmitry Filimonov <dmitry.filimonov@grafana.com>

* Prettier fix

* Update plugins test

* Prettier fix

* updateSnapshotFlag = false

---------

Co-authored-by: Dmitry Filimonov <dmitry.filimonov@grafana.com>
2023-09-11 18:06:34 +02:00
Yuri Tseretyan
dce492642a
Alerting: Export of alert rules in HCL format (#73166)
* import hashicopr/hcl/v2
* add hcl package and export to HCL
* annotate export structs
---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2023-09-11 11:48:23 -04:00
Andre Pereira
485208c8e3
Plugins: Fix streaming support (#74680)
Fix streaming support in backend
2023-09-11 17:59:29 +03:00
Andrew Hackmann
c8a0ebe0e8
Azure Monitor/body close logs an error bug (#74632)
on body close causes logs an error even if no error. also changed to warning similar to the rest of grafana
2023-09-11 09:02:44 -05:00
lean.dev
5e0b20266e
Licensing: Pass func to update env variables when starting plugin (#74620) 2023-09-11 09:33:10 -03:00
Will Browne
e855efb13d
Plugins: Move store and plugin dto to pluginsintegration (#74655)
move store and plugin dto
2023-09-11 13:59:24 +02:00
Marcus Efraimsson
edc34fc836
Instrumentation: Improve instrumentation for database migrations (#74659) 2023-09-11 14:10:21 +03:00
Marcus Efraimsson
8ee43f3705
Instrumentation: Add status_source label to request metrics/logs (#74114)
Ref #68480

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2023-09-11 12:13:13 +02:00
Jo
77e4d477e5
Auth: Optimize auth token operations (#74602)
* add token count

* wip

* user count method for tag reporting

* remove non functioning mysql clientFoundRows check

* Update pkg/services/auth/authtest/testing.go

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* add user ID guard

---------

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2023-09-11 10:24:57 +02:00