Commit Graph

1393 Commits

Author SHA1 Message Date
Shachi Solanki
190757b3c6
Tempo / Trace Viewer: Support Span Links in Trace Viewer (#45632)
* Support Span Links in Trace Viewer

* Update ReferencesButton styles

* Remove datasource prop

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-02-25 11:14:13 -07:00
Shirley
a68a570e92
CloudWatch: Add test to executeStartQuery (#45888)
* CloudWatch: Add test to executeStartQuery

* Add test for absence of limit

* Restrict assertions to limit in some tests
2022-02-25 13:14:59 +00:00
Shirley
304185f682
CloudWatch: Fix running go test with count (#45892) 2022-02-25 12:20:07 +01:00
Gábor Farkas
1cad35ea67
loki: backend mode: support all query types (#45619)
* loki: backend mode: support all query types

* loki: backend: adjust vector-parsing field-names

* loki: backend: no interval for streams-dataframes

* loki: backend: enable more query types

* better variable name

* removed unnecessary code

* improve frame-processing

* more unit tests

* improved code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* remove unused code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* simplify code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* lint fix

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-25 09:14:17 +01:00
Yaelle Chaudy
0e7b0f16b8
Adding ap-southeast-3 to cloudwatch regions (#45821) 2022-02-24 14:00:24 +01:00
matt abrams
76da017d00
MySQL: Prevent pre-epoch timestamps from breaking __timeFilter (#45345)
* add logic to change timeFilter query when FROM time is pre-EPOCH

* fix timeFilter tests where FROM time is pre-EPOCH
2022-02-22 20:06:04 +01:00
Mitsuhiro Tanda
7acb203b52
remove unused code of Cloud Monitoring distribution metrics type (#45702) 2022-02-22 11:24:52 +01:00
Mitsuhiro Tanda
0fb490c00d
Cloud Monitoring: set missing meta data for distribution type metrics (#45500)
* set missing meta data for distribution type metrics

* add test

* add test

* simplify custom set

* add test for executedQueryString

* add test data

* fix tests

* check group by
2022-02-21 11:20:34 +01:00
Joey Tawadrous
955b921c88
InfluxDB: new row value types (#44789)
* Check type and act accordingly

* Add string type

* Add bool type

* Change method name in test

* Remove comment

* Changed test var names to represent the float case

* Added string test case

* Added bool test case

* Update response in test

* Change string val

* Fix frame meta missing in tests

* Fixed test parse query

* Fixed out of bounds test

* parseFloatSeries

* parseStringSeries and parseBoolSeries

* Formatting

* Use multi frames for now

* strings.ToLower for time col check

* Move timeField out of if checks
2022-02-18 17:37:45 +00:00
Gábor Farkas
5d704fd46e
Loki: backend: use custom http code (#44643)
* Loki: backend: use custom http code

* simplfied comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-18 14:35:39 +01:00
Yaelle Chaudy
530913dd37
Azure Monitor : Adding json formatting of error messages in Panel Header Corner and Inspect Error Tab (#44877)
* Trying out json formatting of azure graph err from frontend

* Added some tests wip

* Wrap text in popper tooltip

* fix conflict

* Wrap text in tooltip

* Complete tests

* Added invalid json test

* Backend changes and tests

* removed comments

* Added split of message / json and edge cases tests

* Addressed comments

* moved catch to parseErrorMessage
2022-02-18 12:09:24 +01:00
Szymon Szypulski
929d8a358f
Cloudwatch: Add support for AWS/PrivateLink* metrics and dimensions (#45515)
Add support for AWS/PrivateLink{Endpoints,Interfaces} metrics and
dimensions. Change is based on the official AWS documentation[1].

1. https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-cloudwatch-metrics.html
2022-02-18 10:21:17 +01:00
Karl Persson
cdc08105c2
Access control: Set default permissions for data sources when using access control (#45482)
* Rename interfaces and use then with wire injection

* Set default permissions when creating new data source
2022-02-17 14:03:45 +01:00
Isabella Siu
50a53ef58b
CloudWatch: replace metricFindQueries with CallResourceHandler (#41571) 2022-02-16 14:28:26 -05:00
Torkel Ödegaard
cfa24a3cfb
Prometheus: Auto legend handling (#45367)
* Legend editor is working

* It's working

* Progress on auto legend mode

* Fixes

* added unit tests

* Added go tests

* Fixing tests

* Fix issue with timing and internal state

* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryCodeEditor.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-16 14:06:33 +01:00
Joey Tawadrous
b4dd3138ce
InfluxDB: metricFindQuery migration to backend (#44546)
* Send metricFindQuery to backend

* Added feature toggle

* Changed flag name

* metricFindQuery backend

* Added test for metricFindQuery backend parse

* Added test for show tag values

* Test for metricFindQueries

* Updated tests

* Put back comment

* Case insensitive in transformRows

* Check length ov value pair

* Sep tests

* Updated valuePair index
2022-02-16 09:16:22 +00:00
Ryan McKinley
d665306ad1
Search: add feature flag and basic service (#45112)
Co-authored-by: Artur Wierzbicki <artur@arturwierzbicki.com>
2022-02-15 10:26:03 -08:00
Torkel Ödegaard
a757a57c6e
Prometheus: Show executed query in inspector (#45362)
* Prometheus: Show executed query in inspector

* Loki: Improving test
2022-02-15 15:02:03 +01:00
Shirley
1c1a45a880
CloudWatch: Add tests to annotations query (#45337) 2022-02-15 12:45:50 +01:00
Marcus Efraimsson
6a776c78d4
Datasource: Fixes storing of secureJSONData when creating/updating datasource (#45290)
Fixes an issue introduced by #44987 where bus dispatch was replaced by calling sqlstore 
directly instead of the datasource service.

Fixes #45273
2022-02-11 15:52:14 +01:00
Shirley
89a0c0fc37
Cloudwatch: Remove unused parameters (#45237)
* Remove unused parameters

* Remove unused context

* Make plugin context first parameter
2022-02-10 17:15:11 +01:00
Gábor Farkas
96ae44ee2c
loki: alerting: do not round timestamps to seconds (#45057) 2022-02-10 12:53:46 +01:00
Shirley
5edcc2e795
Cloudwatch: Use generic null-insertion mechanism (#43507)
* Cloudwatch: Fix nil values for a period gap in metrics

* Use fields periods for intervals
2022-02-10 10:17:45 +01:00
Joey Tawadrous
10232c7857
InfluxDB: backend migration (run query in explore) (#43352)
* InfluxDB backend migration

* Multiple queries and more

* Added types

* Updated preferredVisualisationType

* Updated model parser test to include limit,slimit,orderByTime

* Added test for building query with limit, slimit

* Added test for building query with limit, slimit, orderByTime and puts them in the correct order

* Add test: Influxdb response parser should parse two responses with different refIDs

* Moved methods to responds parser

* Add test to ensure ExecutedQueryString is populated

* Move functions out of response parser class

* Test for getSelectedParams

* Merge cases

* Change to const

* Test get table columns correctly

* Removed unecessary fields

* Test get table rows correctly

* Removed getSeries function

* Added test for preferredVisualisationType

* Added test for executedQueryString

* Modified response parser

* Removed test

* Improvements

* Tests

* Review changes

* Feature flag rename and code gen
2022-02-09 18:26:16 +00:00
Gábor Farkas
d9d1f8520e
loki: backend-queries: set interval-value in dataframe (#44965)
* loki: backend-queries: set interval-value in dataframe

* fixed unit test

* added interval-specific unit test
2022-02-07 13:02:04 +01:00
Sergey Kostrukov
85ea1a5d64
Prometheus: Fix Azure authentication support (#44407)
Re-adding back Azure authentication support to Prometheus datasource 
after the datasource query logic was rewritten from plugin.json routes to 
Go backend.

Ref #35857
2022-02-03 17:06:31 +01:00
Todd Treece
c8bb4c733e
Prometheus: Set interval on time field (#44802) 2022-02-03 08:15:55 -05:00
Ryan McKinley
ac90c8d68d
Geomap: initialization fixes (#44745) 2022-02-01 22:08:07 -08:00
Ryan McKinley
3749695594
TestData: support dropping points from random walk data and send interval (#44683) 2022-02-01 17:27:52 +01:00
Gábor Farkas
3873c5e7b5
loki: alerting: better error-handling (#44700) 2022-02-01 13:34:03 +01:00
Ryan McKinley
6a72d97265
TestData: support raw results in the raw frames editor (#44609) 2022-01-31 15:40:58 -08:00
Isabella Siu
cbbf451b36
CloudWatch: small logs refactors (#44677) 2022-01-31 17:30:16 -05:00
Ivana Huckova
780591cc12
Prometheus: Fix some of the alerting queries that use reduce/math operation (#44380)
* Prometheus: Dont fill response with nulls for alerting queries

* Refactor based on reviews
2022-01-31 18:14:30 +01:00
Santiago
7ed82ac049
Check for empty URLs when creating/updating a data source (#42837)
* checks for empty URLs added

* check for TimeSeriesTypeNot to fix InfluxDB alerts

* log a warning when a data frame is ignored

* fix: add brittle Prometheus URL input selector

needs a proper aria-label or test-data-id selector

* test: add URL input aria-label

needs to use the grafana/e2e-selectors package

* test: run ci

* add URL validation for specific data sources, e2e tests

* Update pkg/api/datasource/validation.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* delete duplicated logs

* delete unnecessary leading newline

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-01-31 12:39:55 -03:00
Gábor Farkas
6e071d030f
loki: added benchmark for metric-response processing (#44539) 2022-01-28 09:44:57 +01:00
Gábor Farkas
b42161a713
Loki: add from JSON to dataframes tests (#44375)
* Loki: add from JSON to dataframes tests

* fixed wrong content-type

* added -Inf test-case
2022-01-27 12:43:44 +01:00
Ryan McKinley
5d66194ec5
FeatureFlags: define features outside settings.Cfg (take 3) (#44443) 2022-01-26 09:44:20 -08:00
Morten Nygaard Åsnes
9e4aafa719
MSSQL: Configuration of certificate verification for TLS connection (#31865)
Fixes #24589

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-01-26 15:00:18 +01:00
Mitsuhiro Tanda
d1083b9597
Cloud Monitoring: Reduce request size when listing labels (#44365) 2022-01-26 12:02:42 +01:00
Agnès Toulet
65bdb3a899
FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382)
* Revert "FeatureToggles: register all enterprise feature toggles (#44336)"

This reverts commit f53b3fb007.

* Revert "FeatureFlags: manage feature flags outside of settings.Cfg (#43692)"

This reverts commit f94c0decbd.
2022-01-24 16:08:05 +01:00
Gábor Farkas
9161f9d2e1
prometheus: added json-loading benchmark (#44309) 2022-01-24 14:39:26 +01:00
Gábor Farkas
0f8b0dc301
prometheus: refactor test (#44358) 2022-01-24 11:08:41 +01:00
Ryan McKinley
f94c0decbd
FeatureFlags: manage feature flags outside of settings.Cfg (#43692) 2022-01-20 13:42:05 -08:00
Will Browne
7fbc7d019a
Plugins: Core plugins register via backend factory provider (#43171)
* refactoring store interface and init flow

* fix import

* fix linter

* refactor resource calling

* load with class

* re-order args

* fix tests

* fix linter

* remove old creator

* add custom config struct

* fix some tests

* cleanup

* fix

* tackle plugins

* fix linter

* refactor and fix test

* add connect failure error

* add fix for azure, cloud monitoring and test data

* restructure

* remove unused err

* add fake tracer for test

* fix grafana ds plugin
2022-01-20 18:16:22 +01:00
Isabella Siu
2c3bed1f4b
CloudWatch: remove unused "live" log code (#44185) 2022-01-20 08:58:39 -05:00
idafurjes
30aa24a183
Chore: Implement OpenTelemtry in Grafana (#42674)
* Separate Tracer interface to TracerService and Tracer

* Fix lint

* Fix:Make it possible to start spans for both opentracing and opentelemetry in ds proxy

* Add span methods, use span interface for rest of tracing

* Fix logs in tracing

* Fix tests that are related to tracing

* Fix resourcepermissions test

* Fix some tests

* Fix more tests

* Add TracingService to wire cli runner

* Remove GlobalTracer from bus

* Renaming test function

* Remove GlobalTracer from TSDB

* Replace GlobalTracer in api

* Adjust tests to the InitializeForTests func

* Remove GlobalTracer from services

* Remove GlobalTracer

* Remove bus.NewTest

* Remove Tracer interface

* Add InitializeForBus

* Simplify tests

* Clean up tests

* Rename TracerService to Tracer

* Update pkg/middleware/request_tracing.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Initialize tracer before passing it to SQLStore initialization in commands

* Remove tests for opentracing

* Set span attributes correctly, remove unnecessary trace initiliazation form test

* Add tracer instance to newSQLStore

* Fix changes due to rebase

* Add modified tracing middleware test

* Fix opentracing implementation tags

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-01-20 11:10:12 +01:00
Gabriel MABILLE
54280fc9d7
AccessControl: Resolve attribute based scopes to id based scopes (#40742)
* AccessControl: POC scope attribute resolution

Refactor based on ScopeMutators

test errors and calls to cache

Add comments to tests

Rename logger

Create keywordMutator only once

* AccessControl: Add AttributeScopeResolver registration

Co-authored-by: gamab <gabriel.mabille@grafana.com>

* AccessControl: Add AttributeScopeResolver to datasources

Co-authored-by: gamab <gabriel.mabille@grafana.com>

* Test evaluation with translation

* fix imports

* AccessControl: Test attribute resolver

* Fix trailing white space

* Make ScopeResolver public for enterprise redefine

* Handle wildcard

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-01-18 17:34:35 +01:00
Andres Martinez Gotor
4e1c7e868e
Cloudwatch: use the backend HTTP client provider (#44036) 2022-01-18 09:34:12 +01:00
Piotr Jamróz
9fb8339f87
Elastic: Allow using long/int as date field for alerts (#44027)
* Use integers for time range filter

Previously it was passed as a string which is automatically converted by Elastic to a number only if the field type is "date". For other types (e.g. "long") such conversion doesn't work. In theory "date" could be passed as a formatted string but we don't use it this way and always pass it as a number so it is safe to always pass numbers, not strings.

* Fix time_series_query_test

* Retrigger build
2022-01-17 15:45:09 +01:00
Ivana Huckova
e704110f74
Prometheus: Fix interpolation of $__rate_interval variable (#44035)
* Name fields based on targets length

* Remove rounding in rate interval variable replacing

* Refactor and fix edge  case when interval and time duration would be rate interval

* Add tests

* Remove , from test

* Revert "Name fields based on targets length"

This reverts commit 5dcb34a765.
2022-01-17 15:32:23 +01:00