Commit Graph

11464 Commits

Author SHA1 Message Date
Agnès Toulet
46c1c03183
Rendering: Fix Windows plugin signature check (#76123)
* Rendering: Fix Windows plugin signature check

* apply review feedback
2023-10-06 15:48:29 +02:00
Andrej Ocenas
1cbae72a9e
Pyroscope: Fix backend panic when querying out of bounds (#76053) 2023-10-06 15:03:20 +02:00
Jo
41bcb5e07f
Identity: Port folder library to identity.Requester (#76105)
Port folders to identity.Requester
2023-10-06 15:02:34 +02:00
Jo
c4874f97f8
Identity: Port snapshots and annotations to Requester (#76103)
* Port snapshots to Requester

* Port annotations to Requester
2023-10-06 11:59:48 +02:00
Jo
342af2d078
Identity: Port Annotations and Analytics to Identity.Requester (#76104)
* Port analytics to requester

* Port annotations to identity.Request
2023-10-06 11:38:20 +02:00
Jo
729dafaff9
Auth: Unfurl OrgID in pkg/api to allow using identity.Requester interface (#76108)
Unfurl OrgID in pkg/api to allow using identity.Requester interface
2023-10-06 11:34:36 +02:00
Jan Garaj
68a027993c
CloudWatch: Add missing AWS/Transfer metrics (#76079)
Source: https://docs.aws.amazon.com/transfer/latest/userguide/monitoring.html
2023-10-06 10:47:36 +02:00
Jo
12ccc8ca23
SigningKeys: Clean old keys by expiry (#76048)
* clean old keys by expiry

* nit
2023-10-06 10:45:24 +02:00
Yuri Tseretyan
4343c99e2a
Add compat function for notify.GrafanaIntegrationConfig to EmbeddedContactPoint (#75995)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2023-10-05 23:13:34 +03:00
Yuri Tseretyan
a66760f9f2
Alerting: Add integration tests for Rule Export API (#75896) 2023-10-05 15:47:49 -04:00
Yuri Tseretyan
51499d7763
Alerting: Update alert rule export models to omit default values (#75918)
* do not include rule uid in response if it's empty
* make some fields of export models nillable
2023-10-05 15:16:44 -04:00
Todd Treece
664ebf771e
K8s: Playlist frontend reads (#76057) 2023-10-05 15:00:36 -04:00
Gabriel MABILLE
e902d8fd10
AuthN: New service to support multiple authentication providers for plugins (#75979)
* OnGoing

* Continue migrating structure

* Comment

* Add intermediary service

* Remove unused error so far

* no need for fmt use errors

* use RoleNone

* Docs

* Fix test

* Accounting for review feedback

* Rename oauthserver.ExternalService to OAuthClient

* Revert as the interface looks weird

* Update pluginintegration

* Rename oauthserver.ExternalService

* closer to what it was before
2023-10-05 18:13:06 +02:00
Karl Persson
81b366e2c8
AuthN: Make logger less noisy (#76044)
* Change to debug for token needs rotation errors
2023-10-05 16:11:36 +02: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
Will Browne
8a33a6f958
Plugin: Accept backend plugin process command args (#76037)
accept args
2023-10-05 15:15:57 +02:00
Josh Hunt
3e2ca29c8d
BrowseDashboards: Enable new browse dashboards UI by default (#75822)
* BrowseDashboards: Enable new browse dashboards UI by default

* update docs

* enable new e2e tests
2023-10-05 13:14:10 +03:00
Misi
bd2191c158
Auth: OAuth token sync improvements (#75943)
* Add metric, improve token refresh

* changes

* handle ctx cancelled

* Fix import order
2023-10-05 11:19:43 +02:00
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