aws / aws/aws-sdk-java-v2

Add support for Micrometer's Observation API

Open
#4,611 6 comments 55 reactions 0 assignees View on GitHub
feature-request p2
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

### Describe the feature

With [Micrometer](https://micrometer.io/) 1.10.0 (I'm a maintainer), a new API was released called the [Observation API](https://micrometer.io/docs/observation). It lets users instrument their components once and then get multiple benefits out of it e.g.: metrics, distributed tracing, (audit) logs, publishing arbitrary events, etc.

We also released [Micrometer Tracing](https://github.com/micrometer-metrics/tracing) (it's a new project) which is not a must but plays nicely with the Observation API and it can bridge calls to OpenTelemetry or OpenZipkin's Brave.

What do you think about instrumenting the AWS SDK using Micrometer (probably in a separate module) so that users can get observability support when they use the SDK.

### Use Case

The use cases are quite wide, the goal of the Observation API is to be able to cover a lot of the Observability needs of the users, for example:
- Users want metrics in their apps (they can use micrometer metrics or other libraries, e.g.: dropwizard-metrics)
- Users want distributed tracing in their apps (they can use Micrometer Tracing with Brave/OTel or other libraries)
- Users want both metrics and distributed tracing in their apps
- Users want to listen to and publish custom events in their applications and emit logs, write an audit DB, etc.

### Proposed Solution

_No response_

### Other Information

It seems that there is a user demand for this, see:
- https://github.com/awspring/spring-cloud-aws/issues/646
- https://github.com/awspring/spring-cloud-aws/issues/566
- https://stackoverflow.com/questions/77227632/unable-to-trace-in-spring-boot-3-when-using-sqs-queue
- https://stackoverflow.com/questions/74477506/how-to-track-request-metrics-in-aws-java-sdk-amazons3-client-in-micrometer
- Quite a few users were asking about this (mostly SQS) on Micrometer Slack too

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS Java SDK version used

irrelevant

### JDK version used

irrelevant

### Operating System and version

irrelevant

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.