Commit Graph

428 Commits

Author SHA1 Message Date
Ross
5f4d1d4872
CloudWatch: Add missing EventBridge Pipe metrics (#69994) 2023-06-16 12:04:47 +02:00
Tania
0316350d16
Codegen: Generate any instead of interface{} (#70201)
* Chore: Update thema to latest

* Regenerate
2023-06-16 10:54:56 +02:00
Kevin Yu
387cf7ec60
CloudWatch: Add missing AWS/FSx metrics (#69816) 2023-06-08 21:44:28 +00:00
Selene
bd622a5381
Chore: Unify references for dataquery (#68963)
* Unify references for dataquery

* Fix ResultFormat in azure types

* Update azure-log with new schema

* Fix cloudwatch query

* Update thema

* Fix test

* More fixes

* More fixes

* Fix lint
2023-05-26 10:16:01 +02:00
sam boyer
323cbe1997
kindsys: Adapt to new flattened lineage syntax in Thema (#68034)
* Update all core kinds to flattened lineages

* Regen Go types, without any

* Regen Go types, s/interface{}/any/

* Update generated core typescript

* Update generate docs

* Fix defaults gen in veneer index jenny

* Flatten plugindef lineage

* Convert all plugin kinds to flattened form

* Switch back to interface{} for now

* Switch to fs.Sub in plugin DeclParser

* Mostly undesirable codegen changes, to be fixed

* Update mod and sum

* Update pfs tests to flattened lineages

* Update thema to latest, regen docs
2023-05-24 10:47:25 +02:00
Will Browne
286b9e08e9
Plugins: Bump Plugin SDK version and address instance management breaking changes (#68900)
* bump sdk and propagate ctx

* fix tests
2023-05-24 10:19:34 +02:00
Isabella Siu
0612f1f87a
Cloudwatch Logs: Ignore non-time grouping fields in expressions and alerts (#67608) 2023-05-16 08:58:04 -04:00
Danila Shiman
2cd98eae24
Cloudwatch: Add FraudDetector namespace with metrics and dimensions (#67318) 2023-04-27 13:29:35 -04:00
Shirley
e17496d79a
CloudWatch: Deprecate dynamic labels feature toggle, remove support for Alias in backend (#66494) 2023-04-27 11:19:45 +02:00
Kevin Yu
68a277b53b
CloudWatch: Add field level comments to schema (#66900)
* CloudWatch: Add field level comments to schema

* update comments

* pr comments

* remove unneeded test
2023-04-24 08:57:39 -07:00
Alex Khomenko
2e55f26e53
Cloudwatch: Fix nested recursive type (#66950)
* Cloudwatch: Fix nested recursive type

* Cloudwatch: Update exports
2023-04-20 19:39:02 +03:00
Kevin Yu
a21fdd9c81
CloudWatch: Use generated type from schema in backend (#66420)
* CloudWatch: Use generated type from schema in backend

* address comments

* don't explicity set default metric query type
2023-04-18 11:56:00 -07:00
Stephanie Hingtgen
255d8f3326
Plugins: Remove secure socks proxy feature toggle (#66611) 2023-04-18 11:11:23 -06:00
Alex Khomenko
49eb9db698
Cloudwatch: Fix some schema todos (#66664)
* Cloudwatch: fix todos

* Cloudwatch: Run make-gen
2023-04-18 08:46:51 +03:00
Selene
9665b3afe7
Chore: Update Cuetsy to v0.1.8 version (#66456)
* Update cuetsy version

* Fix defaults

* Update cuetsy

* Update cuelang version in bingo

* Remove TODO comments
2023-04-14 16:45:54 +02:00
Sven Grossmann
8567ec92b0
Cloudwatch: Change type of ts field in log responses to time (#66525)
* make timestamp field time type

* Add test for type on handleLogEvents data frame field response

---------

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
2023-04-14 16:21:16 +02:00
Ida Štambuk
6309d3fae6
Cloudwatch: Pass refId from query for expression queries (#66147)
Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2023-04-13 10:07:06 +02:00
Shirley
ae23ef5b41
CloudWatch: Refactor around handleGetRegions (#65713)
* Create minimal EC2 interface

* convert regions variable to a function returning a copy

* Add test for multiple calls to regions to check regionsCache

* Add returns to handler after error

* Refactor handleGetRegions
2023-04-11 19:55:57 +02:00
Ida Štambuk
2648fcb833
Cloudwatch: Add missing AWS/IVS namespace metrics (#65985) 2023-04-06 09:52:26 +02:00
Isabella Siu
92965578b3
CloudWatch Logs: Fix running logs queries with expressions (#65306) 2023-03-30 17:40:01 -04:00
Stephanie Hingtgen
fb5a7acc73
Plugins: Add cloudwatch support with the secure socks proxy (#65303)
* Plugins: enable secure socks proxy on cloudwatch with workaround
2023-03-27 10:00:37 -06:00
Piotr Erdanowski
d5dacf5cd5
Cloudwatch: Add MeteredIOBytes metric for EFS (#64793) 2023-03-23 12:14:32 -04:00
Shirley
972e611f76
CloudWatch Logs: Revert "Queries in an expression should run synchronously (#64443)" (#65036)
Revert "CloudWatch Logs: Queries in an expression should run synchronously (#64443)"

This reverts commit 74436d31de.
2023-03-20 15:54:30 +01:00
Isabella Siu
74436d31de
CloudWatch Logs: Queries in an expression should run synchronously (#64443) 2023-03-13 13:31:46 -04:00
Ryan McKinley
4b94c7e5d2
Schema: Remove key from root DataQuery type (#64467) 2023-03-08 16:52:31 -05:00
Kevin Yu
70f600db10
Cloudwatch Logs: Make mixed type fields fallback to being strings (#63981)
* Cloudwatch Logs: make mixed type fields fallback to being strings

* addressing pr comments
2023-03-07 14:35:19 -08:00
Alex Khomenko
8999de4313
Cloudwatch: Use generated TS types (#63166)
* Add veneer

* Fix queries

* Remove redundant type

* Fix todos

* Sync and fix some todos

* Revert unrelated changes

* Revert unrelated changes[2]

* Revert unrelated changes[3]
2023-03-07 14:39:52 +02:00
Isabella Siu
4f3d64e8b7
CloudWatch: Make deeplinks work for us-gov and china regions (#64080) 2023-03-06 16:00:59 -05:00
Selene
e1350a905f
Chore: Update thema and cuesty v0.1.6 (#63629)
* Update thema and cuesty

* Update thema version

* Update thema again

* update thema

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2023-03-01 00:23:57 -05:00
Isabella Siu
b674cad09e
CloudWatch: Add AWS/IotSiteWise namespace and metrics (#63534) 2023-02-22 08:55:18 -05:00
Selene
7ace44c8b5
Chore: Update oapi-codegen library (#62962)
* Update oapi library and thema

* Use fork commit to fix elasticsearch and cloudwatch generators

* Update thema

* Fixes

* Update thema with last fixes

* Sync

* Fix test

* Update thema and schemas

* Update thema
2023-02-21 12:34:24 +01:00
Conor Evans
a5786bb9cf
CloudWatch: Add Cloudfront Function metrics (#62990)
feat: add Cloudfront Function metrics to NamespaceMetricsMap

Signed-off-by: Conor Evans <coevans@tcd.ie>
2023-02-07 17:30:36 +01:00
Alex Khomenko
84a6671911
Cloudwatch: generate types (#61770)
* New pfs impl

* Reached codegen parity with old system

* Update all models.cue inputs

* Rename all models.cue files

* Remove unused prefixfs

* Changes Queries->DataQuery schema interface

* Recodegen

* All tests passing, nearly good now

* Add SchemaInterface to kindsys props

* Add pascal name deriver

* Relocate plugin cue files again

* Clarify use of injected fields

* Remove unnecessary aliasing

* Move DataQuery into mudball

* Allow forcing ExpandReferences on go type generation

* Move DataQuery def into kindsys, add generator to copy it to common

* Fix copy generator to replace package name correctly

* Setup Cloudwatch data query schema

* Add go file

* Re-generate types

* Re-generate types

* Add missing files

* Re-generate docs

* Add MetricStat

* Add CloudWatchAnnotationQuery

* Remove DataQuery extension

* Fixes

* Sync with main

* Update report

---------

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-02-03 15:27:48 -05:00
Jan Garaj
2ff715cb7a
CloudWatch: Add missing AWS/DX metric (#62405) 2023-01-30 09:26:14 +01:00
Denis Limarev
812c90ec69
Perfomance: Add preallocation for some slices (#61632) 2023-01-23 17:44:27 +01:00
Erik Sundell
432cdbade4
Cloudwatch: Add support for template variables in new log group picker (#61243) 2023-01-13 14:03:08 -05:00
Jan Garaj
28dbbe9f5f
CloudWatch: Add CloudWatchSynthetics dimension (#60832) 2023-01-13 14:56:29 +01:00
Jan Garaj
d5da42bbbc
CloudWatch: Add RDS dimension (#61027) 2023-01-12 11:47:12 +01:00
Jan Garaj
056d5df285
CloudWatch: Add MaxProvisionedTableReadCapacityUtilization AWS/DynamoDB metric name (#60829) 2023-01-12 11:07:25 +01:00
Erik Sundell
c72ab21096
Cloudwatch: Refactor log group fields request (#60909)
* cloudwatch/log-group-fields-refactor

* remove not used code

* remove empty line

* fix broken test

* add tests

* Update pkg/tsdb/cloudwatch/routes/log_group_fields_test.go

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>

* pr feedback

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2023-01-11 08:12:58 +01:00
Erik Sundell
c3378aff8b
Cloudwatch: Use new log group picker also for non cross-account queries (#60913)
* use new log group picker also for non cross-account queries

* cleanup and add comment

* remove not used code

* remove not used test

* add error message when trying to set log groups before saving

* fix bugs from pr feedback

* add more tests

* fix broken test
2023-01-09 16:30:21 +01:00
Erik Sundell
bd09e88e50
Cloudwatch: Refactor log group model (#60873)
* refactor log group query model

* update deprecated comment

* refactor test
2023-01-04 10:07:03 +01:00
Erik Sundell
6e89421544
CloudWatch: Add macro for resolving period in SEARCH expressions (#60435)
* interpolate macro in the backend

* refactor logger in cloudwatch query

* revert added metrics

* add docs

* apply pr feedback

* fix broken test

* fix spelling
2023-01-02 09:08:31 +01:00
Marcus Efraimsson
c35c689a96
Plugins: Automatically forward plugin request HTTP headers in outgoing HTTP requests (#60417)
Automatically forward core plugin request HTTP headers in outgoing HTTP requests. 
Core datasource plugin authors don't have to specifically handle forwarding of HTTP 
headers, e.g. do not have to "hardcode" the header-names in the datasource plugin, 
if not having custom needs.

Fixes #57065
2022-12-21 13:25:58 +01:00
Isabella Siu
d6bb2a7493
Cloudwatch: Fix deeplink with default region (#60260)
Cloudwatch: fix deeplink with default region
2022-12-13 15:24:28 -05:00
Erik Sundell
fde9a5d112
Cloudwatch: Backend cleanup (#59663)
* cleanup cloudwatch.go

* streamline interface naming

* use utility func

* rename test utils file

* move util function to where they are used

* move dtos to models

* split integration tests from the rest

* Update pkg/tsdb/cloudwatch/cloudwatch.go

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>

* refactor error codes aggregation

* move error messages to models

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-12-02 10:21:46 +01:00
Erik Sundell
254577ba56
CloudWatch: Cross-account querying support (#59362)
* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* Lattice: Add dynamic label for account display name (#579)

* Build: Automatically sync lattice-main with OSS

* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* add account label

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* fix import

* solve merge related problem

* add account info (#608)

* add back namespaces handler

* Lattice: Parse account id and return it to frontend (#609)

* parse account id and return to frontend

* fix route test

* only show badge when feature toggle is enabled (#615)

* Lattice: Refactor resource response type and return account (#613)

* refactor resource response type

* remove not used file.

* go lint

* fix tests

* remove commented code

* Lattice: Use account as input when listing metric names and dimensions (#611)

* use account in resource requests

* add account to response

* revert accountInfo to accountId

* PR feedback

* unit test account in list metrics response

* remove not used asserts

* don't assert on response that is not relevant to the test

* removed dupe test

* pr feedback

* rename request package (#626)

* Lattice: Move account component and add tooltip (#630)

* move accounts component to the top of metric stat editor

* add tooltip

* CloudWatch: add account to GetMetricData queries (#627)

* Add AccountId to metric stat query

* Lattice: Account variable support  (#625)

* add variable support in accounts component

* add account variable query type

* update variables

* interpolate variable before its sent to backend

* handle variable change in hooks

* remove not used import

* Update public/app/plugins/datasource/cloudwatch/components/Account.tsx

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update public/app/plugins/datasource/cloudwatch/hooks.ts

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* add one more unit test

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* cleanup (#629)

* Set account Id according to crossAccountQuerying feature flag in backend (#632)

* CloudWatch: Change spelling of feature-toggle (#634)

* Lattice Logs (#631)

* Lattice Logs

* Fixes after CR

* Lattice: Bug: fix dimension keys request (#644)

* fix dimension keys

* fix lint

* more lint

* CloudWatch: Add tests for QueryData with AccountId (#637)

* Update from breaking change (#645)

* Update from breaking change

* Remove extra interface and methods

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* CloudWatch: Add business logic layer for getting log groups (#642)



Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Lattice: Fix - unset account id in region change handler (#646)

* move reset of account to region change handler

* fix broken test

* Lattice: Add account id to metric stat query deep link (#656)

add account id to metric stat link

* CloudWatch: Add new log groups handler for cross-account querying (#643)

* Lattice: Add feature tracking (#660)

* add tracking for account id prescense in metrics query

* also check feature toggle

* fix broken test

* CloudWatch: Add route for DescribeLogGroups for cross-account querying (#647)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>

* Lattice: Handle account id default value (#662)

* make sure right type is returned

* set right default values

* Suggestions to lattice changes (#663)

* Change ListMetricsWithPageLimit response to slice of non-pointers

* Change GetAccountsForCurrentUserOrRole response to be not pointer

* Clean test Cleanup calls in test

* Remove CloudWatchAPI as part of mock

* Resolve conflicts

* Add Latest SDK (#672)

* add tooltip (#674)

* Docs: Add documentation for CloudWatch cross account querying (#676)

* wip docs

* change wordings

* add sections about metrics and logs

* change from monitoring to observability

* Update docs/sources/datasources/aws-cloudwatch/_index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* apply pr feedback

* fix file name

* more pr feedback

* pr feedback

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* use latest version of the aws-sdk-go

* Fix tests' mock response type

* Remove change in Azure Monitor

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-11-28 12:39:12 +01:00
Shirley
7cec30f0e1
CloudWatch: Fix flaky test assertions (#59234) 2022-11-23 17:13:47 +01:00
Shirley
c43e1a721f
CloudWatch: fix custom namespace for listing dimension keys, refactor to non-pointer types, add test assertions, rename packages (#59106)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-11-22 15:59:11 +01:00
Sasha Melentyev
c02003af3c
Refactor time durations (#58484)
This change uses `time.Second` in place of `1000 * time.Millisecond` and `time.Minute` in place of `60*time.Second`.
2022-11-22 15:09:15 +08:00