Commit Graph

12797 Commits

Author SHA1 Message Date
Giuseppe Guerra
eb31f71f60
Plugins: Enable feature toggle pluginsDynamicAngularDetectionPatterns by default (#84723)
* Enable feature toggle pluginsDynamicAngularDetectionPatterns by default

* Change backgroundJobInterval to 24h

* re-generate feature toggles

* Use different intervals for cloud vs on-prem

* temporarily switch interval log to info level

* debug level again

* Simplify provideDynamic for tests

* re-generated feature toggles files

* PR review feedback

* PR review feedback: removed dependency from plugin management config
2024-03-21 18:22:06 +02:00
Marcus Efraimsson
6c1de260a2
API Server: Standalone observability (#84789)
Adds support for logs (specify level), metrics (enable metrics and Prometheus /metrics endpoint 
and traces (jaeger or otlp) for standalone API server. This will allow any grafana core service 
part of standalone apiserver to use logging, metrics and traces as normal.
2024-03-21 17:06:32 +01:00
Xavi Lacasa
a813046f3d
Better tracing during extSvcAcc registration (#84719) 2024-03-21 16:41:10 +01:00
Erik Sundell
29d4f6a217
Datasource: Change query filtering (#84656)
* call filterQuery from queryrunner

* test query hide filtering

* fix more broken tests

* lint errrors

* remove redundant filterQuery call

* skip filter in variable queries

* fix broken cypress test

* change tooltip text

* fix translations

* fix comments

* do not execute query is targets are empty

* add more tests

* remove unsued import

* update translations

* revert id change

* change header text

* update comment for hide prop

* rename hide query prop

* change tooltip and introduce different toggle state text

* update tests

* update comment and regenerate types

* run extract again

* fix broken e2e test

* track event

* fix build issues

* revert changes in wire file
2024-03-21 13:39:39 +01:00
Giuseppe Guerra
3387132b9b
Build: Add "gen-feature-toggles" Makefile target (#84803)
* Add Makefile target "make gen-feature-toggles" to generate feature toggles files

* Better output for gen-feature-toggles
2024-03-21 12:04:49 +01:00
Selene
473898e47c
Core: Remove thema and kindsys dependencies (#84499)
* Move some thema code inside grafana

* Use new codegen instead of thema for core kinds

* Replace TS generator

* Use new generator for go types

* Remove thema from oapi generator

* Remove thema from generators

* Don't use kindsys/thema for core kinds

* Remove kindsys/thema from plugins

* Remove last thema related

* Remove most of cuectx and move utils_ts into codegen. It also deletes wire dependency

* Merge plugins generators

* Delete thema dependency 🎉

* Fix CODEOWNERS

* Fix package name

* Fix TS output names

* More path fixes

* Fix mod codeowners

* Use original plugin's name

* Remove kindsys dependency 🎉

* Modify oapi schema and create an apply function to fix elasticsearch errors

* cue.mod was deleted by mistake

* Fix TS panels

* sort imports

* Fixing elasticsearch output

* Downgrade oapi-codegen library

* Update output ts files

* More fixes

* Restore old elasticsearch generated file and skip its generation. Remove core imports into plugins

* More lint fixes

* Add codeowners

* restore embed.go file

* Fix embed.go
2024-03-21 11:11:29 +01:00
Andres Martinez Gotor
9298a5fcb5
AzureMonitor: Update standalone HTTP middlewares (#84833) 2024-03-21 08:53:27 +01:00
Matthew Jacobson
fbd057b258
Alerting: Stop returning autogen routes for non-admin on api/v2/status (#84864)
* Alerting: Stop returning autogen routes for non-admin on api/v2/status

* Improve api/v2/status integration tests for user roles
2024-03-20 22:04:35 +02:00
Will Browne
c8c372c327
Prometheus: Prevent duplicate registration of custom header middleware (#84860)
* remove dupe middleware

* fix test
2024-03-20 21:22:33 +02:00
Andreas Christou
00c094f7cf
Azure: Update data link title for clarity (#84686)
Update data link title for clarity
2024-03-20 13:39:00 -05:00
William Wernert
6d16cf2699
Alerting: Marshal incoming json.RawMessage in diff (#84692)
This will ensure the encoding is correct when comparing
to the existing rule.
2024-03-20 13:10:39 -04:00
Adam Simpson
311aa94fab
MSSQL: Add Windows AD/Kerberos auth (#84742)
* mssql: Add Kerberos/Windows AD auth

* need username for cache file

* account for no port in cc file

* add tests around constring

* remove un-needed port

* add docs

* remove comments

* move defer to same locale as where it begins

* fix linting and spelling

* fix gosec linter

* note lack of grafana cloud support
2024-03-20 16:41:57 +02:00
Yuri Tseretyan
04c9f459ec
Alerting: do not check for folder in file provisioning (#84822)
provide nil folder service in file provisioning
2024-03-20 10:39:03 -04:00
Ida Štambuk
18eac9df9e
Feature toggles: Remove redshiftAsyncQueryDataSupport and athenaAsyncQueryDataSupport toggles (#84653) 2024-03-20 15:14:21 +01:00
Andres Martinez Gotor
a705ff7892
API Server: refactor plugin ID handling (#84753) 2024-03-20 13:49:19 +01:00
Fabrizio
288b06b64c
Loki: Replace imports of infra/log with SDK (#84336) 2024-03-20 11:25:35 +02:00
Ivana Huckova
77b1c97482
Elasticsearch: Remove xpack button and make includeFrozen not dependant on it (#84734) 2024-03-20 09:59:26 +01:00
Gábor Farkas
fba2b61408
postgres: removed unused code (#84736)
sql: removed unused code
2024-03-20 09:28:42 +01:00
George Robinson
f3e5ad00d6
Remove extra defers in screenshot sevice (#84697) 2024-03-20 07:13:16 +00:00
Yuri Tseretyan
e593d36ed8
Alerting: Update rule access control to explicitly check for permissions "alert.rules:read" and "folders:read" (#78289)
* require "folders:read" and "alert.rules:read"  in all rules API requests (write and read). 

* add check for permissions "folders:read" and "alert.rules:read" to AuthorizeAccessToRuleGroup and HasAccessToRuleGroup

* check only access to datasource in rule testing API

---------

Co-authored-by: William Wernert <william.wernert@grafana.com>
2024-03-19 22:20:30 -04:00
Andreas Christou
6bb7ab261a
AzureMonitor: User authentication support (#81918)
* Stub out frontend user auth

* Stub out backend user auth

* Add context

* Reorganise files

* Refactor app registration form

* Alert for user auth service principal credentials

* AzureMonitor: Add flag for enabling/disabling fallback credentials for current user authentication (#82332)

* Rename field

* Add fallback setting

* Update tests and mock

* Remove duplicate setting line

* Update name of property

* Update frontend settings

* Update docs and default config files

* Update azure-sdk

* Fix lint

* Update test

* Bump dependency

* Update configuration

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

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

* Docs review

* AzureMonitor: User authentication frontend updates (#83107)

* Rename field

* Add fallback setting

* Update tests and mock

* Remove duplicate setting line

* Update name of property

* Update frontend settings

* Update docs and default config files

* Add alerts to query editor

- Add authenticatedBy property to grafana/data
- Update mocks
- Update query editor to disable it under certain circumstances
- Update tests

* Add separate FallbackCredentials component

- Reset AppRegistrationCredentials component to only handle clientsecret credentials
- Update AzureCredentialsForm
- Update selectors
- Update tests
- Update credentials utility functions logic

* Alert when fallback credentials disabled

* Update condition

* Update azure-sdk

* Fix lint

* Update test

* Remove unneeded conditions

* Set auth type correctly

* Legacy cloud options

* Fix client secret

* Remove accidental import

* Bump dependency

* Add tests

* Don't use VerticalGroup component

* Remove unused import

* Fix lint

* Appropriately set oAuthPassThru and disableGrafanaCache properties

* Clear azureCredentials on authType change

* Correctly retrieve secret

* Fix bug in authTypeOptions

* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/CurrentUserFallbackCredentials.tsx

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

* Update public/app/plugins/datasource/azuremonitor/components/QueryEditor/QueryEditor.tsx

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

* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/CurrentUserFallbackCredentials.tsx

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

* Add documentation links

* Fix broken link

---------

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

* AzureMonitor: Update docs for current user authentication (#83440)

* Rename field

* Add fallback setting

* Update tests and mock

* Remove duplicate setting line

* Update name of property

* Update frontend settings

* Update docs and default config files

* Add alerts to query editor

- Add authenticatedBy property to grafana/data
- Update mocks
- Update query editor to disable it under certain circumstances
- Update tests

* Add separate FallbackCredentials component

- Reset AppRegistrationCredentials component to only handle clientsecret credentials
- Update AzureCredentialsForm
- Update selectors
- Update tests
- Update credentials utility functions logic

* Alert when fallback credentials disabled

* Update condition

* Update azure-sdk

* Fix lint

* Update test

* Remove unneeded conditions

* Set auth type correctly

* Legacy cloud options

* Fix client secret

* Remove accidental import

* Bump dependency

* Add tests

* Don't use VerticalGroup component

* Remove unused import

* Update docs

* Fix lint

* Appropriately set oAuthPassThru and disableGrafanaCache properties

* Clear azureCredentials on authType change

* Correctly retrieve secret

* Feedback

* Spelling

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

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

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

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

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

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

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

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

---------

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

* Docs review

* Update docs with additional configuration information

* Fix to appropriately hide the query editor

* Typo

* Update isCredentialsComplete

* Update test

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
2024-03-19 16:32:24 +00:00
Hugo Kiyodi Oshiro
b1c4ebe6e8
Plugins: Enable managedPluginsInstall by default (#84721)
Plugins: enable managedPluginsInstall by default
2024-03-19 16:34:46 +01:00
Andreas Christou
7c3f621688
Chore: Update grafana-azure-sdk-go (#84741)
* Update grafana-azure-sdk-go

* Update test
2024-03-19 14:56:40 +00:00
Yuri Tseretyan
9dc4221508
Alerting: Log expression command types during evaluation (#84614) 2024-03-19 10:00:03 -04:00
Ryan McKinley
e27c08cfa9
QueryService: Return application/json and better errors (#84234) 2024-03-19 15:52:15 +02:00
Fabrizio
d1f791cf1f
Jaeger: Decouple Jaeger plugin (#81377) 2024-03-19 15:39:31 +02:00
Santiago
4ad6d66479
Alerting: Remove ID from UserGrafanaConfig struct (#84602)
* Alerting: Remove ID from UserGrafanaConfig struct

* user custom mimir image withoud id in grafana config

* change mimir image name
2024-03-19 12:47:13 +01:00
Santiago
c9bb18101c
Alerting: Decrypt secrets before sending configuration to the remote Alertmanager (#83640)
* (WIP) Alerting: Decrypt secrets before sending configuration to the remote Alertmanager

* refactor, fix tests

* test decrypting secrets

* tidy up

* test SendConfiguration, quote keys, refactor tests

* make linter happy

* decrypt configuration before comparing

* copy configuration struct before decrypting

* reduce diff in TestCompareAndSendConfiguration

* clean up remote/alertmanager.go

* make linter happy

* avoid serializing into JSON to copy struct

* codeowners
2024-03-19 12:12:03 +01:00
Fabrizio
c1c9ccb8e8
Loki: Replace imports of infra/httpclient with SDK (#84337) 2024-03-19 10:59:53 +01:00
Andres Martinez Gotor
abb8ba3885
Update comment in service.go (#84674) 2024-03-19 09:09:07 +01:00
Marcus Efraimsson
e978d0810e
DS apiserver: Minor fixes (#84691) 2024-03-19 09:02:52 +01:00
Agnès Toulet
58170d4141
Rendering: Add PDFRendering capability (#84438)
* Rendering: Add PDFRendering capability

* fix tests
2024-03-19 08:48:46 +01:00
Isabella Siu
0606a8e413
CloudWatch: Static labels should use label name (#84611)
CloudWatch: static labels should use label name
2024-03-18 17:30:59 -04:00
Charandas
2d1cd82a98
K8s: standalone: use Grafana's logger to stream all logs (#84530)
---
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2024-03-18 19:25:30 +02:00
Matthew Jacobson
3ea5c08c88
Alerting: External AM fix parsing basic auth with escape characters (#84681) 2024-03-18 13:04:57 -04:00
Ivana Huckova
494d169980
Elasticsearch: Fix legend for alerting, expressions and previously frontend queries (#84485)
* Elasticsearch: Fix legend for alerting, expressions and previously frontend queries

* Add comment

* Update comment
2024-03-18 18:01:33 +01:00
Kyle Brandt
818c94f067
Scopes: (Chore) Fix ScopeDashboard by adding spec (#84675) 2024-03-18 17:16:53 +01:00
Rob
677b765dab
NodeGraph: Edge color and stroke-dasharray support (#83855)
* Adds color and stroke-dasharray support for node graph edges

Adds support for providing color, highlighted color, and visual display of node graph edges as dashed lines via stroke-dasharray.

* Updates node graph documentation

* Updates documentation

Adds default for `highlightedColor`

* Update docs/sources/panels-visualizations/visualizations/node-graph/index.md

Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>

* Update packages/grafana-data/src/utils/nodeGraph.ts

Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>

* Update docs/sources/panels-visualizations/visualizations/node-graph/index.md

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

* Removes highlightedColor; deprecates highlighted

Per [request](https://github.com/grafana/grafana/pull/83855#issuecomment-1999810826), deprecates `highlighted` in code and documentation, and removes `highlightedColor` as an additional property. `highlighted` will continue to be supported in its original state (makes the edge red), but is superseded if `color` is provided.

* Update types.ts

Missed a file in my last commit. Removes `highlightedColor` and deprecates `highlighted`.

* Add test scenario in test data source

---------

Co-authored-by: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2024-03-18 16:26:22 +01:00
Kyle Brandt
aec2ef727a
Prometheus/Scopes: Update to use scopespec type from app (#84593) 2024-03-18 09:49:26 -04:00
Andrej Ocenas
5b085976bf
Pyroscope: Fix template variable support (#84477) 2024-03-18 14:25:47 +01:00
Kyle Brandt
aac2cf0aa5
Scopes: Update BE API to include object for linking scope to dashboards (#84608)
* Add ScopeDashboard

---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2024-03-18 09:22:28 -04:00
Isabella Siu
00f16cd018
CloudWatch Logs: Remove toggle for cloudWatchLogsMonacoEditor (#84414) 2024-03-18 08:56:57 -04:00
Ieva
7aa0ba8c59
Teams: Display teams page to team reader if they also have the access to list team permissions (#84650)
* display teams to team reader if they also have the access to list team permissions

* fix a typo in the docs
2024-03-18 14:52:01 +02:00
Jack Westbrook
4ca68925a1
Backend: Delete bundled plugin tests (#84646) 2024-03-18 13:28:24 +01:00
Andres Martinez Gotor
e394110f44
Fix api_plugins_test locally (#84484) 2024-03-18 12:08:49 +01:00
Joey
f5e83d07a7
Tempo: Deprecate old search (#84498)
* Add logic to update query from old search to new search i.e. nativeSearch to traceqlSearch

* Remove nativeSearch query and transform

* Update tracking

* Remove nativeSearch from query field

* Udpdate gen comment

* Fix tests

* Add tests

* Remove comments

* Remove log

* Remove log

* Update comment

* Update ids etc for migratedQuery

* Remove old nativeSearch folder

* Fix tests, manual testing
2024-03-18 09:17:10 +00:00
Andres Martinez Gotor
6204f1e847
Chore: Use SigV4 middleware from aws-sdk (#84462) 2024-03-18 09:33:22 +01:00
Dan Cech
89f3b70e17
Storage: Add support for listing resource history (#84331)
* add support for listing resource history

* make watch handle custom label selectors properly

* fix tests

* Apply suggestions from code review

Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>

* properly handle special characters in json label matcher

* tidy up

---------

Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
2024-03-15 19:17:54 -04:00
Josh Hunt
08f4aeded1
E2C: Change permissions for navigating to Cloud Migration (#84594)
* allow org admins / settings writers to access e2c

* test for org admin specifically
2024-03-15 17:22:39 +00:00
William Wernert
97f37b2e6f
Alerting: Clamp Loki ASH range query to configured max_query_length (#83986)
* Clamp range in loki http client to configured max_query_length

Defaults to 721h to match Loki default
2024-03-15 18:59:45 +02:00