* pkg/tsdb/parca: Upgrade to using the flamegraph arrow
* pkg/tsdb/parca: Delete code for old flamegraphs
* pkg/tsdb/parca: Fix golangci-lint error in test
* pkg/tsdb/parca: Handle errors nicely
* docs/sources/datasource: Add Parca v0.19+ support note
* pkg/tsdb/parca: Don't use arrow table reader
As pointed out during reviews, it's not really needed and we can read the record directly.
* Re-add feature flag with deprecation note
* Hide the field in frontend if ff disabled
* Block scope overriding if ff is disabled in backend
- Update promlib to forward logger to extendOptions
- Add warning
- Update tests
* Default toggle to true for now
* Update description
* Update prom tests
* Fix lint
* Plugins: Enhanced plugin instrumentation
* use backend.CallResourceResponseSenderFunc
* sdk v0.237.0
* support admission control
* cover all handlers in log and metrics middlewares
* fix after review
* Revert "Chore: Return influxdb query error early before parsing the result (#88549)"
This reverts commit a87c155c06.
* Handle error in buffered parser
* handle error message in streaming parser
* add function to search for free port
* Update pkg/tsdb/influxdb/fsql/fsql_test.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* Update pkg/tsdb/influxdb/fsql/fsql_test.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* fix test
* fix go linting issue
* fix go lint
---------
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* chore(perf): Pre-allocate where possible (enable prealloc linter)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* fix TestAlertManagers_buildRedactedAMs
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* prealloc a slice that appeared after rebase
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* return error early
* enable gzip between grafana and influxdb
* use json-iterator package for json operations
* revert gzip changes
* update test
* go mod tidy
go work sync
* Update types
* Mark datasource as supporting traces
* Add logic to transform exemplar query to traces query
* Render appropriate editor
* Run trace query for exemplars
* Refactor out common functions
- Add function to retrieve first/default subscription
* Add route for trace exemplars
* Update logic to appropriately query exemplars
* Update traces query builder
* Update instance test
* Remove unneeded import
* Set traces pseudo data source
* Replace deprecated function calls
* Add helper for setting default traces query
* Don't show resource field for exemplars query
* When resetting operation ID for exemplars set query to default
- Update tests
* Update query header to appropriately set the service value
* Fix response frame creation and update tests
* Correctly select resource
* Convert subscriptionsApiVersion to const
* Add feature toggle
* Azure monitor: Basic Logs frontend (#85905)
* adds datasource level config for enabling basic logs
* add basiclogsquery type to query json
* add toggle between basic and analytics
* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected
* add check to remove UI if alerting
* tests for logsmanagement component
* tests for logs query editor
* tests for time mangement control
* remove unused imports
* clears query whenever toggle changes from basic <-> analytics
* add test to account for clearning query
* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx
wording
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* update dependency list
* clear basic logs if resources change
* fix tests
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Azure Monitor: Basic Logs modal acknowledgement (#86244)
* adds datasource level config for enabling basic logs
* add basiclogsquery type to query json
* add toggle between basic and analytics
* adds basic logs toggle from UI, blocks time picker to only dashboard if basic logs is selected
* add check to remove UI if alerting
* tests for logsmanagement component
* tests for logs query editor
* tests for time mangement control
* remove unused imports
* add confirm modal
* clears query whenever toggle changes from basic <-> analytics
* add test to account for clearning query
* adds modal acknowledgement for basic logs query
* tests for handling modal logic
* basic logs ack type
* Update public/app/plugins/datasource/azuremonitor/components/ConfigEditor/BasicLogsToggle.tsx
wording
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsQueryEditor.tsx
spelling
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* update dependency list
* clear basic logs if resources change
* remove modal from config page
* remove basic logs query ack type
* add modal acknowledgement to toggle between basic and analytics
* clear query if resources change
* fix tests
* fix tests
* Update public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/LogsManagement.tsx
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* fix tests
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Azure Monitor: Basic Logs Backend (#87653)
* fix logic for showingBasicLogsToggle
* move to utils function and add basiclogsquery in apply template variable
* add backend safeguards for basiclogsqueries
* adds support for calling search or query apis based on whether it is basic logs or not
* add tests for utils
* initial test for basic logs query in the backend
* tests for basic logs
* remve comment
* simplify checks for basic logs
* adds fromAlert prop for azure monitor backend services
* adds fromAlert check fo basic logs
* fix working and empty tags
* add telemetry for basic logs
* remove import from grafana core package
* change fromAlert true in tests
* change the way tests catch errors
* Update pkg/tsdb/azuremonitor/loganalytics/utils.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update pkg/tsdb/azuremonitor/loganalytics/utils.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update pkg/tsdb/azuremonitor/loganalytics/utils.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* restructure code to only run basic logs checks if basiclogsflag is true
* data retention warning
* tests for calculate time range
* Simplify determining if request is from alerting
* Fix lint and bool check
* Fix tests
* clarify data retention
---------
Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
* Azure Monitor: Basic Logs data volume notification (#88009)
* frontend changes for data ingested warning
* initial logic for getResource
* payload processing
* create basicLogs usage function
* add utils for converting time and getting the data volume query for basic logs
* frontend updates for showing the data ingested for the given query
* frontend tests
* add check for when no dataIngested is returned
* remove backend.logger prints
* comment on what function does
* fix merge
* make resource URI regex case insensitive
* add support for workspace variables in basic logs flow
* add undefined check
* structure and add tests for variable support
* Update pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* add tracing for basic logs usage request
* clean up data volume query struct
* use async/await instead of callback
* fix parameters for getApiURL
* restrict time on usage query to 8 days max
* add time to dependency array to refetch basic logs usage
* move time check implementation to backend
* fix utils tests
---------
Co-authored-by: Jocelyn <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
---------
Co-authored-by: jcolladokuri <jcolladokuri@microsoft.com>
Co-authored-by: jcolladokuri <jocelyncollado52@gmail.com>
* Remove unneeded error check
* Refactor to reduce cyclomatic complexity
* Add util function for parsing resultformat
* Make use of util
* Remove unneeded types
* Move types to their own file
* Move getApiUrl to utils
* Move traces functions to separate file
- Add separate helper for building trace string queries
* Add helper for determining resources
* Add test for RetrieveResources
* Don't append twice
* Refactor tests
* CloudWatch: Fix metric query with group by not being labelled in alerts
* just use one key for the labels
* not needed
* unused function
* add tests
* pr comments
* fetch dimensions to build labels for MetricQuery type queries
* pr comments
* group cache related tests and use fresh cache for non-cache related tests
* don't cache empty values
* make cfg private in sqlstore
* fix db init in tests
* fix case
* fix folder test init
* fix imports
* make another Cfg private
* remove another Cfg
* remove unused variable
* use store cfg, it has side-effects
* fix mutated cfg in tests
* Simplify proxy dialer creation
- Set new dialer on connector
- Create MSSQL connector in a similar fashion to postgres
* Update test
* Fix lint
* More lint
* Use correct driver name
* copied files
* add copy of Pointer
* fix the API
* forward resample to the namespaced code
* moved the aligning-code to the parent
* call namespaced resample directly
* lint fix
* lint fix
* switch to plugin-sdk-go resample
* adjusted import path
* don't iterate over first column as it is a time column already
* don't iterate over first column as it was handled earlier
* add more flexibility to run the commands
* Update pkg/tsdb/influxdb/influxql/converter/converter.go
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* 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