EmfMetricLoggingPublisher: Support multiple dimensionsets for metrics
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 56/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- aws, java
- Domain
- observability-sre
Research direction
Start with EmfMetricLoggingPublisher and its Builder, then read the existing dimensions options and the PropertiesFactory pattern in the linked API documentation. Define how a DimensionSetsFactory is supplied and how existing dimension settings continue to work. Done means metrics can emit multiple EMF DimensionSets while preserving current single-dimension behavior.
Written by the indexing model from the issue text.
Description
Describe the feature
The existing EmfMetricLoggingPublisher currently supports a single set of dimensions for metrics. The EMF format supports an array of DimensionSet for each metric to allow metrics to be rolled up at different granularity.
Use Case
I'd like to be able to report client metrics rolled up for the entire service and also report them rolled up per api operation in that service.
e.g. for FooService with operations foo and bar, I'd like to have metrics reporting the DynamoDB query latency with the DimensionSets below
[Service=FooService, Client=DDB, ClientOperation=Query]- Service level
[Service=FooService, Operation=[foo|bar], Client=DDB, ClientOperation=Query]
- Service+Operation level
Note: In order to provide the Context to the EmfMetricLoggingPublisher as to which Service Operation is running, that is possible today with a client interceptor that adds a custom SDK metric to the call which is capable of propagating whatever context is needed to produce these dimensions. That is functionally how I plan to bridge service level context information into the MetricCollection that the publisher has access to.
Proposed Solution
Add an additional field on the builder to support a DimensionSetsFactory which follows the same pattern as the PropertiesFactory. The existing dimensions options would continue to work as they do today with them producing DimensionSetsFactory internally allowing the publisher to consistently adopt the DimensionSetsFactory internally for producing metric dimensions.
Alternatively one could update the builder to accept a Collection of DimenionSets rather than just a single DimensionSet but the factory may prove more flexible for consumers.
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS Java SDK version used
2
JDK version used
21
Operating System and version
linux
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 39
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-sdk-java-v2
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/aws-sdk-java-v2#7379 ·
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws/aws-sdk-java-v2#7174 ·
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
aws/aws-sdk-java-v2#7060 ·
-
announcement
Difficulty 3/5 1-2 days Newbie friendliness 25/100
aws/aws-sdk-java-v2#7385 ·
-
bug
aws/aws-sdk-java-v2#7350 · 4 comments · 1 assignee ·
All issues in aws/aws-sdk-java-v2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100