Commit Graph

455 Commits

Author SHA1 Message Date
Dan Cech
790e1feb93
Chore: Update test database initialization (#81673)
* streamline initialization of test databases, support on-disk sqlite test db

* clean up test databases

* introduce testsuite helper

* use testsuite everywhere we use a test db

* update documentation

* improve error handling

* disable entity integration test until we can figure out locking error
2024-02-09 09:35:39 -05:00
Isabella Siu
3b852bb582
CloudWatch: Remove references to pkg/infra/metrics (#81744)
CloudWatch: remove references to pkg/infra/metrics
2024-02-06 21:21:55 +02:00
Bruno
89fb56bc11
Add secureSocksDSProxyEnabled label to grafana_datasource_request_duration_seconds (#80910)
* Add secureSocksDSProxyEnabled label to grafana_datasource_request_duration_seconds

* rename label from secureSocksDSProxyEnabled to secure_socks_ds_proxy_enabled

* DataSourceMetricsMiddleware: add secure_socks_ds_proxy_enabled label to every metric
2024-02-01 11:42:43 -03:00
Gabriel MABILLE
08f305797f
RBAC: Add metric to count search user permissions cache hits (#81451) 2024-01-30 10:37:47 +01:00
idafurjes
fb2b9f33d2
Fix method to service in metric label for FolderID (#81283) 2024-01-25 18:26:24 +02:00
idafurjes
0880a239f8
Add leftover metrics for FolderID (#81246) 2024-01-25 12:14:18 +01:00
idafurjes
7e5544ab21
Add MFolderIDsServiceCount to count folderIDs in services pkg (#81237) 2024-01-25 11:10:35 +01:00
idafurjes
6b4eaa0d18
Add MFolderIDsAPICount metric to count FolderIDs in api package (#80866)
* Add MFolderIDsAPICount metric to cound FolderIDs in api package

* Change counter to counter vector with method names as string values
2024-01-24 12:39:11 +01:00
Ryan McKinley
2b355ff280
K8s: Remove grafanaAPIServer feature toggle (#81030) 2024-01-23 08:27:28 -08:00
Jo
9f5a8bf926
AuthInfo: Revert #81013. Fix cache invalidation (#81050)
* Revert "Auth: Revert "Auth: Cache Auth Info" (#81013)"

This reverts commit ce84f7c540.

* fix cache invalidation during user takeover

* fix incomplete test
2024-01-23 15:26:38 +01:00
Marcus Efraimsson
6768c6c059
Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. 
Introduces some new functions for creating setting.Cfg.
2024-01-23 12:36:22 +01:00
Misi
ce84f7c540
Auth: Revert "Auth: Cache Auth Info" (#81013)
Revert "Auth: Cache Auth Info"
2024-01-22 21:25:24 +02:00
Alexander Zobnin
08082104e1
Access control: Add permissions cache hit/miss metrics (#80883)
* Access control: Add permissions cache hit/miss metrics

* Add metrics to OSS

* Fix imports
2024-01-19 13:47:58 +01:00
Jo
c767481dee
Auth: Cache Auth Info (#80620)
* leverage cache for auth info

* fix tests and integration

* fix panic

* fix panic
2024-01-18 15:22:19 +01:00
Gabriel MABILLE
e062fa1d7e
RBAC: Change search permissions buckets to cover long searches (#80624)
* RBAC: Change search permissions histogram start and factor

* Add one bucket and lower start
2024-01-17 09:13:56 +01:00
Gabriel MABILLE
48ff532ca8
RBAC: Add histogram metric on search endpoint (#80553)
RBAC: Add histogram on search endpoint
2024-01-15 17:56:01 +01:00
Ryan McKinley
2c09f969f1
K8s: Add dashboard service (requires dev mode) (#78565) 2024-01-11 01:20:30 +02:00
Ryan McKinley
1caaa56de0
FeatureFlags: Use interface rather than manager (#80000) 2024-01-09 10:38:06 -08:00
Jo
3c4bc24dec
ServerLock: Fix missing return ID for postgres (#79878)
fix missing return ID for postgres
2023-12-28 11:15:18 +01:00
Jo
a595353d57
ServerLock: Rework serverlock to use raw SQL and not depend on id (#79859)
* rework SQL to use raw sql and more resistant to DBs that do not return ID

* rework SQL to return ID in all DBs. Avoid using ID as operator
2023-12-27 14:59:43 +01:00
Ryan McKinley
67bbdd7c05
K8s/Folders: Add folders api service (with legacy storage) (#79413) 2023-12-20 20:28:56 +02:00
Will Browne
ef60c90dfa
Plugins: Make file system path handling in tests OS agnostic (#79651)
* make path handling OS agnostic

* PR feedback

* fix input for test case
2023-12-19 11:01:48 +01:00
Dan Cech
9f6144059a
Storage: Switch from tenant to namespace & remove GRN (#79250)
* remove GRN and switch tenant to namespace

* clean up remaining references

* simplify and remove inconsistency in With* parameters

* parse listing keys so we can use db index

* bump the schema version

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-11 12:26:05 -05:00
Todd Treece
89934b0884
K8s: Merge metric registries (#79256) 2023-12-08 10:44:46 -05:00
Todd Treece
2a2a132c61
K8s: Refactor metrics to share k8s registry (#79106) 2023-12-06 16:34:23 -05:00
Todd Treece
7e2aad1d01
Revert "K8s: Refactor metrics to share k8s registry (#77957)" (#79079)
This reverts commit 38bc41651a.
2023-12-05 09:34:07 -05:00
Todd Treece
38bc41651a
K8s: Refactor metrics to share k8s registry (#77957)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-04 10:54:59 -08:00
Dan Cech
3c89e68fc1
Chore: Fix timeout issues when gathering prometheus datasource stats (#74618)
* fix timeout issues when gathering prometheus flavor stats

* workaround data race in sdk tracing middleware

* cap concurrency at 10

---------

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-11-29 16:01:54 -05:00
Alexander Weaver
8a56a94781
Usagestats: Add stat group for alert rule groups (#78825)
* Add rule group support to usagestats service

* Quote column name
2023-11-29 14:37:36 -06:00
Alexander Weaver
27b7d1de6f
Stats: Fix unregistered unified alerting metric (#78777)
Fix unregistered metric
2023-11-29 08:28:13 -06:00
Jo
0de66a8099
Authz: Remove use of SignedInUser copy for permission evaluation (#78448)
* remove use of SignedInUserCopies

* add extra safety to not cross assign permissions

unwind circular dependency

dashboardacl->dashboardaccess

fix missing import

* correctly set teams for permissions

* fix missing inits

* nit: check err

* exit early for api keys
2023-11-22 14:20:22 +01:00
Xavi Lacasa
72759be6ec
AuthN: Support HA setups with External Service Account management (#78425)
* Lock when creating external service

* Add local lock back

* Improve function signature

* Define lockName separately to make it more explicit

* Update pkg/infra/serverlock/serverlock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/infra/serverlock/serverlock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-11-22 10:15:13 +01:00
Ryan McKinley
71f32d4e19
K8s: Ensure there is always a user in appcontext.User (#78247) 2023-11-15 16:52:54 -08:00
Ryan McKinley
a221c1d754
Chore: Remvoe newDBLibrary feature flag (#78074) 2023-11-14 06:51:35 -08:00
Andres Martinez Gotor
fcc2f01c7e
Chore: Update otel deps (#78069)
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2023-11-14 14:14:15 +01:00
Giuseppe Guerra
7b4bcc86f1
Plugins: Pass OTEL sampling config to plugins (#76834)
* Pass OTEL sampling config to plugins

* fix capital letters

* Do not pass sampler env vars if sampling is not configured

* Add tests

* PR review feedback

* Simplify tracing env vars logic

* Update test to reflect pkg/infra/tracing behaviour
2023-11-10 14:56:08 +01:00
Dan Cech
67b2972052
Chore: add/update sqlstore-related helper functions (#77408)
* add/update sqlstore-related helper functions

* add documentation & tests for InsertQuery and UpdateQuery, make generated SQL deterministic by sorting columns

* remove old log line
2023-11-03 10:30:52 -04:00
Drew Slobodnjak
9116043453
Storage: Add maxFiles to list functions (#76414)
* Storage: Add maxFiles to list functions

* Add maxDataPoints argument to listFiles function

* Add maxFiles to ResourceDimensionEditor

* Update pkg/services/store/http.go

* rename First to Limit

---------

Co-authored-by: jennyfana <110450222+jennyfana@users.noreply.github.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-11-01 09:42:24 -07:00
Dan Cech
e01d096ce2
add resource group to grn (#77396) 2023-10-30 17:08:46 -04:00
Todd Treece
bf8af608a7
K8s: Add tracer provider to config (#77003) 2023-10-25 15:19:44 -04:00
Jo
f2bf066ad2
SigningKeys: Add jwks endpoint (#76040)
* add jwks

add remote caching

add expose jwks test

tweaks

* fix swagger

* nt
2023-10-05 15:17:31 +02:00
Marcus Efraimsson
e4c1a7a141
Tracing: Standardize on otel tracing (#75528) 2023-10-03 14:54:20 +02:00
Marcus Efraimsson
0128d0403f
Tracing: Use tracing.InitializeTracerForTest (#75479) 2023-09-27 09:51:57 +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
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
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
Sven Grossmann
7e01dde762
Logging: Add WithContextualAttributes to pass log params based on the given context (#74428)
* suggestion to use `RegisterContextualLogProvider`

* add `pluginId`

* change to `WithContextualAttributes`

* move approach to instrumentation.go

* improve `WithContextualAttributes`

* unexport consts

* typo

* remove comment

* add `nil` check
2023-09-07 13:13:34 +02:00
linoman
13f4382214
Auth: Implement requester interface in access control module (#74289)
* Implement requester interface in the access control module
2023-09-06 11:16:10 +02:00
Serge Zaitsev
bd12ce0cbc
Chore: capitalise log messages for app platform (#74336) 2023-09-04 18:46:08 +02:00
Marcus Andersson
017078913a
Plugins: Added plugin preload time measurement to frontendmetrics (#73916)
Added preload ms to frontend metricts.
2023-09-04 07:09:14 +02:00