cdklabs / cdk-monitoring-constructs

Easy-to-use CDK constructs for monitoring your AWS infrastructure
https://constructs.dev/packages/cdk-monitoring-constructs
Apache License 2.0
465 stars 61 forks source link

[Feature] Support for AwsSdk metrics #264

Open r0b0ji opened 1 year ago

r0b0ji commented 1 year ago

Feature scope

AwsSdk/JavaSdk2

Describe your suggested feature

Feature Ask

This feature request is to add support for Sdk metrics. The relevant public docs on how to enabled [1] Sdk metrics for java. Here is the metrics which are emitted when enabled this Sdk metrics [2].

When enabled this Sdk metrics, the metrics appears with

Namespace: AwsSdk/JavaSdk2 Dimensions: [ServiceId, OperationName]

For ex: when I enabled this Sdk metrics for Aws AppConfig [3], the ServiceId=AppConfigData, there are two operations called OperationName=[GetLatestConfiguration, StartConfigurationSession] and 14 metrics from [2] for each operation.

Proposal

My proposal is to create a segment per operationName and a simple layout could be

First Row: Volume (RPS of ApiCallDuration), Latency (ApiCallDuration), Success (ApiCallSuccessful count or sum or maybe rate by dividing with count of ApiCallDuration), RetryCount

References

[1] https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/metrics.html [2] https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/metrics-list.html [3] https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html

voho commented 1 year ago

Hi, this seems like a good idea. Do you have any preference on the API naming/structure/usage pattern, dashboard, or anything? If not, we can come up with our own, but I have to ask :).