* Introduce a new feature flag for prometheus buffered client
* Use querydata client as default and put buffered client behind the feature flag
* Remove prometheusStreamingJSONParser feature flag as it is not needed anymore
* Update tests
* Fix unit tests
* Update feature flag description
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
* Adding two new fields to the data JSON in the prometheus datasource configuration: prometheusType, and prometheusVersion.
* Version field will attempt to auto-detect via buildinfo API when prometheus Type is selected
* Sent resource calls for metadata to the backend
* moved resource calls to the backend
* code review feedback
* fixed post with body
* statuscode >= 300
* cleanup
* fixed tests
* fixed datasource tests
* code review feedback
* force some other endpoints to only GET
* fix linting errors
* fixed tests
* was able to remove section of redundant code
* cleanup and code review feedback
* moved query_exemplars to get request
* fixed return on error
* went back to resource calls, but using the backendsrv directly
* moved to a resource call with fallback
* fixed tests
* check for proper messages
* proper check for invalid calls
* code review changes
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
* 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>
* avoid duplicate allocations
* set labels
* Replace NaN in matrix with null
* Refactor and add test
* Update test
* Append response only if no error
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Fix processing for table in dashboard - expolre compatible
* Add processing of histograms
* Interpolsate rate_interval in step field
* Add tests
* Fix function name
* Extract internal range and interval variables to constants
* Fix typings, refactor, simplify
* Fix constant that was missing _ms
* Prometheus: Run Explore both queries trough backend
* Refactor, simplify
* Set default values for query type selector
* Run multiple queries as one query trough backend
* Remove trailing newlines
* Pass utcOffset
* Remove trailing comma
* WIP: Implementatioon of exemplars
* add sampling for exemplars
* Refactor to use response as custom metadata
* Simplify processing of exemplars
* Update, clean up
* Refactor the way how we get available exemplars
* Simplify exemplars disabling and running on frontend
* Add tests
* Update toggle
* Remove console log
* Fix go linting
* Fix e2e test
* Trigger Build
* Compare lengts, small fix
* Remove duplicated time check
* Address feedback
* Remove redundant ! as not needed
* Update
* Prometheus: Run Explore both queries trough backend
* Refactor, simplify
* Set default values for query type selector
* Run multiple queries as one query trough backend
* Remove trailing newlines
* Pass utcOffset
* Remove trailing comma
* Add meta to frames only at 1 place
* Set exemplars to falsee if they are disabled
* Revert "Set exemplars to falsee if they are disabled"
This reverts commit e7b697c9f3.
* Prometheus: Add running of instant queries trough backend
* Rename response, keep zero length frames
* Remove debug log
* Simplify and fix value text
* Update duplicated and redundant go test
* Update public/app/plugins/datasource/prometheus/datasource.ts
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Refactor using model to create Promquery
* Fix the response length
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Run Explore range queries trough backend
* Remove trailing comma
* Add timeRange step alignment to backend
* Remove creation of instant query on backend as it is not supported ATM
* Remove non-related frontend changes
* Pass offset to calculate aligned range trough prom query
* Update order in query error message
* tableRefIds shouldn't contain undefined refIds
* Remove cloning of dataframes when processing
* Don't mutate response
* Remove ordering of processed frames
* Remove df because not needed
* Revert "Prometheus: add functionality to specify desired step interval in dashboards panels (#36422)"
This reverts commit ddf5b65c51.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
* Revert "Explore: add functionality for supporting different step modes in prometheus (#37829)"
This reverts commit f433cfd8d9.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
* Revert stepMode BE implementation from #36796
Co-authored-by: "Ivana Huckova" <ivana.huckova@gmail.com>
* convert SQLs to use sdk contracts
* make draft
* postgres
* intermedia
* get datasourceinfo filled at the beginning of the service
* move the interval into package because of cyclict import and fix all postgres tests
* fix mysql test
* fix mssql
* fix the test for pr https://github.com/grafana/grafana/issues/35839
* fix some issue about intervalv2 package
* update sql test
* wire migration for SQLs
* add sqls to the background process
* make it register instead of register and start
* revert formatting
* fix tests
* fix linter
* remove integration test
* Postgres test fix
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Fixes#30144
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com>