Commit Graph

1985 Commits

Author SHA1 Message Date
Marcus Efraimsson
0128d0403f
Tracing: Use tracing.InitializeTracerForTest (#75479) 2023-09-27 09:51:57 +02:00
Andres Martinez Gotor
c129c0cd39
Chore: Allow to compile testdata backend as a plugin (#75360) 2023-09-26 15:30:25 +02:00
Sijmen
60922e5f77
Cloudwatch: Add missing AWS regions (#75392) 2023-09-25 17:13:46 -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
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
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
Andrej Ocenas
15e54df9f2
Pyroscope: Remove "phlare" from variable, types, strings etc (#75140) 2023-09-20 16:31:22 +02:00
Deepali Gupta
b54e4c0ddb
Chore: Update metrics for AWS/MediaConnect (#74946) 2023-09-19 13:35:16 -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
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
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
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
Isabella Siu
4b7b323061
CloudWatch Logs: Fix log query display name when used with expressions (#74497) 2023-09-13 15:04:50 -04:00
Stephanie Hingtgen
bb2f5fce07
Secure socks proxy: Allow overriding socks username (#74762) 2023-09-12 13:07:41 -06: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
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
ismail simsek
3107459e57
Prometheus: Handle the response with different field key order (#74567)
* Handle the response with different field key order

* More unit tests to cover edge cases

* Cover more edge cases

* make it simpler

* Better test inputs
2023-09-08 19:58:05 +02:00
Ivana Huckova
49bd93aa2b
Elasticsearch: Adjust logging to follow convention (#74554)
* Elasticsearch: Adjust naming in logging according to convention

* Log response parsing per response

* Update

* Fix logging of errors when no response

* Add path to error loggigng

* Update pkg/tsdb/elasticsearch/response_parser.go
2023-09-07 18:15:24 +02:00
Sven Grossmann
d14851c877
Loki: Adjust to logging convention (#74531)
* adjust Loki to logging convention

* Fix call resource logging

* Update dataquery

* Update

* Remove redundant logging

* Fix TODO

* Rename action to stage and use variables

* `resp` might be `nil`

* `resp` might be `nil` here as well

* change to `statusCode`

* use correct logger

* also here

* add query information to logging

---------

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2023-09-07 17:09:24 +02:00
Ivana Huckova
408d0265ce
Elasticsearch: Improve backend instrumentation of CallResource calls (#74530)
Elasticsearch: Improve backend instrumentation of  calls
2023-09-07 13:54:31 +02:00
Ivana Huckova
51391a762b
Elasticsearch: Improve backend instrumentation of QueryData calls (#74172)
* Elasticsearch: Improve backend instrumentation of QueryData calls

* Add fromAlert

* Fix tests, move logger and context to struct

* Add instrumentation for processing response

* Move log for sending request closer to sending request

* Update

* Fix logging, improved messages, fix printing of queries

* Update log text

* Fix tests

* Fix lint

* Update logging to follow our guidelines

* Remove key-value pairs from logs that are going to be passed from instrumentation

* Update pkg/tsdb/elasticsearch/elasticsearch.go
2023-09-07 13:54:16 +02:00
jordanefillatre
b8b5d2fed8
CloudWatch: Add AWS/S3 replication metrics (#74416) (#74418)
Co-authored-by: Isabella Siu <sakurablossom@blueblueworld.com>
2023-09-06 15:10:17 -04:00
Oscar Kilhed
579709c7a6
MSSQL: Add support for MI authentication to MSSQL (#73597)
* Add support for MI authentication to MSSQL

This adds support for managed identity authentication for MSSQL managed
instances running in Azure.

Co-authored-by: baldm0mma <jev.forsberg@grafana.com>
2023-09-06 18:27:19 +02:00
Andrew Hackmann
41ca13418b
AzureMonitor: Remove infra client (#74113)
remove infra client from azure monitor
2023-09-05 09:00:21 -05:00
Sven Grossmann
a403027608
Loki: Add backend healthcheck (#74330)
* add loki healthcheck

* remove `testDatasource` call

* remove unused error check

* change success message

* improve error messages
2023-09-05 08:59:13 +02:00
Serge Zaitsev
93cdc94a94
Chore: capitalise logs in other backend packages (#74344)
* capitalise logs in observability logs

* capitalise oss-bit-tent packages

* capitalise logs in aws-datasources

* capitalise logs for traces and profiling

* capitalise logs for partner datasources

* capitalise logs in plugins platform

* capitalise logs for observability metrics
2023-09-04 22:25:43 +02:00
Sven Grossmann
056c83c788
Loki: Improve backend instrumentation of CallResource calls (#73899)
* instrument call resource

* capitalize log messages
2023-09-01 15:26:25 +02:00
Tristan
b0897d7b36
CloudWatch: Add additional AWS/Firehose metrics for DynamicPartitioning support (#74237) 2023-09-01 09:21:14 -04:00
Sven Grossmann
124f445db0
Loki: Improve backend instrumentation of QueryData calls (#73807)
* improve loki `queryData` instrumentation

* fix lint

* use correct logger in "queryData"

* capitalize log messages

* distinguish between requests from alerting
2023-09-01 11:44:18 +02:00
Sarah Zinger
34a831c83e
Cloudwatch: Add back support for old Log Group picker (#73524)
Cloudwatch: Add back support for old Log Group picker behind feature toggle. 

Fixes issue for aws gov cloud users
2023-08-31 10:13:24 -04:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
Andrew Hackmann
2a835301c3
Azure Monitor: Remove infra logger (#73652)
* removed infra logs

* improve health check

* remove debug and error logs

* feedback

* Update pkg/tsdb/azuremonitor/azuremonitor-resource-handler.go

* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go

* fix close body error

* update test

* resource request should return errors

* go linter

* go linter
2023-08-30 08:39:31 -05:00
ismail simsek
29ea0886e3
InfluxDB: Fix sending retention policy with the backend request (#72763)
* Add retention policy to the request

* refactor

* refactor influxql query flow

* fix healthcheck

* organize imports

* handle queries separately

* fix tests

* update bench test
2023-08-30 12:42:02 +02:00
Gelldur
9e1eab3d70
CloudWatch: Add missing region Middle East (UAE) me-central-1 (#73560)
Add missing region Middle East (UAE) me-central-1
2023-08-29 14:41:57 +02:00
ismail simsek
cfe3d6346f
Chore: Fix the command in comments (#73872)
Fix the command in comments
2023-08-28 17:47:54 +02:00
Ivana Huckova
a80fd02f95
Elasticsearch: Unify default value for geo hash grid precision across the code to 3 (#73922)
* Unify default value

* Use variable to keep default precisions in sync

* Use default precision variable

* Update precision description

* Update defaultPrecisionString and move

* Be more specific in naming of variabkle

* Revert "Merge remote-tracking branch 'origin' into ivana/es-precision-default-value"

This reverts commit 599f236a77, reversing
changes made to 6742be0c6d.

* Revert wrong merge

* Revert wrong merge with turned off lefthook
2023-08-28 16:38:44 +02:00
Joey
59e4c257bb
Tempo: Metrics summary (#73201)
* Metrics summary

* Update query

* Remove colors

* Update states

* Add group by into its own component

* Add group by to search and traceql tabs

* Add spacing for group by

* Update span kind values

* Update span status code values

* Update query based on target + group by

* Cleanup

* Only add targetQuery if not empty

* Add kind=server to table

* Update groupBy query logic

* Add feature toggle

* Use feature toggle

* Self review

* Update target query

* Make gen-cue

* Tweak query

* Update states

* useRef for onChange

* Fix for steaming in search tab

* Add loading state tests

* metricsSummary tests

* Datasource tests

* Review updates

* Update aria-label

* Update test

* Simplify response state

* More manual testing and feedback from sync call

* Prettier and fix test

* Remove group by component from traceql tab

* Cleanup, tests, error messages

* Add feature tracking
2023-08-28 15:02:12 +01:00
Ivana Huckova
6742be0c6d
Elasticsearch: Fix respecting of precision in geo hash grid (#73917)
* Elasticsearch: Fix ignoring precision when running queries trough backend

* Unify default value

* Revert "Unify default value"

This reverts commit d8e1d207a2.

* Update test
2023-08-28 15:28:28 +02:00
Kyle Brandt
38603b1a9e
Prometheus: Check for errors on json response parsing (#73788)
- The util/converter Prometheus response json parse was not checking for errors while parsing. It now does. In particular, if `[dataproxy]/response_limit` is set in Grafana's config, it will now recognize the limit error.
- Fixes #73747
- Adds `jsonitere` package, which wraps json-iterator/go's Iterator's Methods with methods that return errors, so errcheck linting can be relied upon
- Impact:
  - If something was sending malformed JSON to the prometheus or loki datasources, the previous code might have accepted that and partially processed the data
  - Before there may have been partial data with no error, where as no there may be errors but they will have no partial results, just the error.
2023-08-28 15:53:50 +03:00
Andres Martinez Gotor
aa0d4b3e45
Chore: Fix Random Walk scenario for Grafana DS (#73889) 2023-08-28 10:53:30 +02:00
Owen Williams
7b347fd12a
Prometheus: Add $__rate_interval_ms to go along with $__interval_ms (#69582)
* Add $__rate_interval_ms to go along with $__interval_ms

Fixes https://github.com/grafana/grafana/issues/69581

* update doc

* PoC add rate_interval_ms as rate range in prometheus

* Revert "PoC add rate_interval_ms as rate range in prometheus"

This reverts commit 7d4ec700d7.

* Update docs/sources/dashboards/variables/add-template-variables/index.md

grammar nit

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

* Update docs/sources/dashboards/variables/add-template-variables/index.md

---------

Co-authored-by: Galen <galen.kistler@grafana.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-08-27 16:44:58 +02:00
Kyle Brandt
6d8fc42cdd
Prometheus: (Chore) Remove experimental unshipped prometheusWideSerie… (#73751) 2023-08-24 17:47:19 +03:00
Kyle Brandt
fe774415b5
Prometheus: Add ExecutedQueryString to first frame only (#73678) 2023-08-23 11:56:19 -04:00
Marcus Efraimsson
040b7d2571
Chore: Add errutils helpers (#73577)
Add helpers for the errutil package in favor of errutil.NewBase.
2023-08-22 12:52:24 +02:00