538 Commits

Author SHA1 Message Date
a65cc0df93 CloudWatch: Migrate to aws-sdk-go-v2 (#103106)
* Cloudwatch: Migrate to aws-sdk-go-v2 (#99643)
* CloudWatch: use PDC fix from new grafana-aws-sdk
2025-04-01 10:03:06 +02:00
c68234f7e7 Add Makefile targets for generating dashboard app code and update it to SDK v0.35.0 (#102796)
* Update dashboard app to use app SDK v0.35.0

What

This change updates dashboard app to use app SDK v0.35.0 and adds new
Makefile target for running codegen for all apps, in opt-in manner.
Currently only dashboards app is opted in.

Additionally, this changes dashboard app Makefile to properly install
and update app SDK versions when generating code, with app SDK version
pinned in the Makefile itself.

Why

The upgrade addresses issues with `DeepCopy` methods, while the Makefile
targets ensure that codegen is easy to run and uses reproducible
environments.

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Run make update-workspace

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Fix deepcopy methods

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Re-run CUE codegen to satisfy the CI

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Run make update-workspace

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update to v0.35.1

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-03-26 10:49:52 +02:00
5dd0aa2c73 Revert "Cloudwatch: Migrate to aws-sdk-go-v2" (#102738)
Revert "Cloudwatch: Migrate to aws-sdk-go-v2 (#99643)"

This reverts commit 5bb1d5f2c37514f19760a888e638bf9daf51e480.
2025-03-24 19:11:04 +00:00
5bb1d5f2c3 Cloudwatch: Migrate to aws-sdk-go-v2 (#99643) 2025-03-24 11:37:19 +01:00
8c5a4591fd Cloudwatch: Do not parse log query grouping field to float (#102244) 2025-03-18 09:18:58 -04:00
e128c36127 Codegen: Cog and go fixes (#101408)
* Update to latest cog version and update workspaces

* Update generated go files

* Try to avoid concurrency issues

* Update workspaces

* Try to remove the sync...

* Remove grafana dependency from xorm go.mod file
2025-03-12 10:12:56 +01:00
7151ea6abc Codegen: Generate Golang code using cog (#98812)
* Use cog for Go types

* Delete old generation code

* Fix plugins generation

* workspaces update

* Update datasources with new generated code

* More fixes

* Update swagger and openapi specs

* Fixes

* More files...

* Update workspace

* More fixes...

* Remove unused functions
2025-01-14 15:58:38 +01:00
5690859f5f CloudWatch: Fix conditions for fetching wildcards (#98648) 2025-01-09 14:42:06 -05:00
f3a553fb9b CloudWatch: Batch different time ranges separately (#98230) 2025-01-03 10:22:14 -05:00
8f628a0695 Cloudwatch: Change deprecated errorsource references (#97827)
This has been failing to compile, bringing down a _lot_ of tests along with it (notably the entire pkg/tests dir).
The `experimental/errorsource` package was deprecated, so the recommended replacement was used.
2024-12-12 11:37:11 +01:00
7de65b39b5 Elasticsearch and Cloudwatch: Replace deprecated experimental/errorsource (#97363)
* Update elasticsearch

* Update azure monitor

* Update test

* Revert "Update azure monitor"

This reverts commit 21b53845b85c3a43d679d729c33879fdc3e9f027.

* Update cloudwatch
2024-12-12 10:12:03 +01:00
2e342e5b1b CloudWatch: Add OpenSearch PPL and SQL support in Logs Insights (#97508)
Cloudwatch: OpenSearch PPL and SQL support in Logs Insights

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Nathan Vērzemnieks <njvrzm@users.noreply.github.com>
2024-12-06 15:27:19 +01:00
f4e108c34f Cloudwatch: Accept empty string for logstimeout and mark errors downstream (#96947) 2024-12-03 15:02:52 -05:00
fcd88d356c Cloudwatch: Fix parsing for ec2 resource attributes (#96501) 2024-11-15 15:17:50 -05:00
2ad558d046 CloudWatch: Fix segfault when migrating legacy queries (#93543) 2024-09-20 10:54:34 -04:00
2d10068714 CloudWatch: Logs queries should retry on throttling errors (#92535)
CloudWatch: logs queries should retry on throttling errors
2024-08-30 13:55:00 -04:00
df3d8915ba Chore: Bump Go to 1.23.0 (#92105)
* chore: Bump Go to 1.23.0

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* update swagger files

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* chore: update .bingo/README.md formatting to satisfy prettier

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* chore(lint): Fix new lint errors found by golangci-lint 1.60.1 and Go 1.23

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* keep golden file

* update openapi

* add name to expected output

* chore(lint): rearrange imports to a sensible order

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-08-21 11:40:42 -04:00
f19a0ce452 Cloudwatch: Clear cached PDC transport when PDC is disabled (#91357)
Cloudwatch: clear cached PDC transport when PDC is disabled
2024-08-07 16:11:56 +02:00
c68feecb6e CloudWatch: Add errorsource for QueryData (#91085) 2024-07-30 09:55:01 -04:00
9a8be1785a CloudWatch: Fix raw queries with dimensions set (#90348) 2024-07-12 14:24:09 -04:00
c8af659f02 Plugins: Enhanced plugin instrumentation (#90199)
* 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
2024-07-09 15:03:46 +02:00
eef9a7b4e5 Cloudwatch: Rename Metric Query to Metric Insights (#89955) 2024-07-04 10:30:23 +02:00
ba5b33227c Cloudwatch: Round up endTime in GetMetricData to next minute (#89341)
* Add cloudWatchRoundUpEndTime feature toggle
2024-06-27 17:10:28 +02:00
3ac109e759 AWS: Update deprecated aws-sdk functions from env variable versions (#89643) 2024-06-26 11:56:39 -04:00
6262c56132 chore(perf): Pre-allocate where possible (enable prealloc linter) (#88952)
* 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>
2024-06-14 14:16:36 -04:00
114a136378 CloudWatch: Fix labels for raw metric search queries (#88943) 2024-06-07 17:37:19 -04:00
cd15e9732d Cloudwatch: Use the metric map from grafana-aws-sdk (#88733) 2024-06-06 21:25:54 +03:00
d83818f8cc Cloudwatch: Update AWS DynamoDB Metrics (#88418) 2024-06-04 15:22:15 -04:00
4d002d85f9 Cloudwatch Logs: Fix bug where we did not return errors to user (#87190) 2024-06-04 08:43:36 -04:00
be2e420e6b CloudWatch: Handle permissions error and update docs (#88524) 2024-05-31 14:36:38 -04:00
3e872bb77e Cloudwatch: Add Kendra metrics (#86809) 2024-05-31 09:02:29 -04:00
bffd87107b CloudWatch: Add additional AWS/KinesisAnalytics metrics (#88101) 2024-05-21 09:50:19 +02:00
e1e33d2f31 Cloudwatch: Add AWS/Events Metrics (#88097) 2024-05-20 11:46:57 -04:00
6851ad9f8c CloudWatch: Fix apostrophes in dimension values not being escaped (#87182) 2024-05-02 06:15:11 -07:00
a54df47976 CloudWatch: Add labels for Metric Query type queries (#85766)
* 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
2024-04-30 09:06:16 -07:00
8f5839fe8f CloudWatch: Add additional Glue metrics (#85798) 2024-04-09 19:31:39 +00:00
5aa56c9380 CloudWatch: Add a Performance Insights and other missing metrics to aws/rds (#85680) 2024-04-08 14:00:28 +02:00
58f32150c2 CloudWatch: Improve metric label parsing (#84835) 2024-04-05 11:57:56 -04:00
77133ac9c1 CloudWatch: Fix SageMaker MBP namespace typo (#85557) 2024-04-03 15:50:09 -04:00
58b583f0c5 AWS DataSource: Fix namespaces in sagemaker metrics (#85357) 2024-03-28 22:11:11 +02:00
ace1cd6301 CloudWatch : Add missing AWS/ES metrics (#85210)
Adding missing ES metrics
2024-03-26 16:37:07 -04:00
78c6c7fef4 CloudWatch: Add additional AWS/SageMaker metrics (#85009)
add additional AWS/SageMaker metrics for customer
2024-03-22 10:14:21 -07:00
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
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
0606a8e413 CloudWatch: Static labels should use label name (#84611)
CloudWatch: static labels should use label name
2024-03-18 17:30:59 -04:00
a0b68deae4 Cloudwatch: Remove cloudWatchWildCardDimensionValues feature toggle (#84329) 2024-03-15 09:49:53 -04:00
3f5526b915 Cloudwatch: Fix issue with Grafana Assume Role (#84315) 2024-03-12 16:30:54 -04:00
1c2b8576e1 CloudWatch: de-duplicate implementation of AWSDatasourceSettings.Load in LoadCloudWatchSettings (#83556) 2024-03-01 10:48:20 -05:00
b2cb8d8038 CloudWatch: Remove unnecessary sortDimensions function (#83450)
Remove sortDimension

Closes #83338
2024-02-29 08:54:37 -08:00
bdeff84068 CloudWatch: Refactor "getDimensionValuesForWildcards" (#83335) 2024-02-26 16:19:45 -05:00