aws / aws/aws-sdk-java-v2

CloudWatchMetricsPublisher: Allow specifying custom, constant value dimensions

Aperta
#3,729 6 commenti 5 reazioni 1 assegnatario Rivendicata da @debora-ito Vedi su GitHub
feature-request p3 sdk-metrics
Lingua principale
Java
Stelle
2.6k
Fork
1k
Merge medio
2g 9h
PR unite (30g)
51

Descrizione

### Describe the feature

Add option in CloudWatchMetricsPublisher to specify a custom dimension with constant value.

### Use Case

I would like to record AWS SDK metrics per ECS task ID and per AWS service.

The `MetricCollection` does not contain ECS task id as a metric, so it can't be used as dimension. Currently there does not seem to be evident way of how to achieve this.

### Proposed Solution

Something like this:

```
CloudWatchMetricsPublisher
.builder()
.dimensions(List.of(ConstantMetric.create("TaskId", "constant value"), CoreMetric.SERVICE_ID))
```

### 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.17.275

### JDK version used

11.0.12

### Operating System and version

macOS

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.