aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.2k stars 848 forks source link

Add support for Micrometer's Observation API #4611

Open jonatan-ivanov opened 1 year ago

jonatan-ivanov commented 1 year ago

Describe the feature

With Micrometer 1.10.0 (I'm a maintainer), a new API was released called the Observation API. 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 (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:

Proposed Solution

No response

Other Information

It seems that there is a user demand for this, see:

Acknowledgements

AWS Java SDK version used

irrelevant

JDK version used

irrelevant

Operating System and version

irrelevant

debora-ito commented 1 year ago

@jonatan-ivanov thank you for reaching out.

Yes, we are interested in adding support for observability tools in the SDK. The way we envision this is with some kind of interface or abstraction layer in the SDK clients where you can simply provide the tool you want to use, with no implementation of a separate SDK module needed.

It's something we have in our roadmap, but we don't have concrete design plans yet, and no, we don't have a timeline to share. Let's use this Github issue to keep track of the feature.

Note to the community: add a 👍 to the description if you are interested in this. Also feel free to comment about the features you'd like to have around observability in the Java SDK.

jonatan-ivanov commented 1 year ago

Isn't ExecutionInterceptor such an interface?

What do you mean by this:

where you can simply provide the tool you want to use, with no implementation of a separate SDK module needed.

What do you mean by "tool"? A library that can be used to instrument the SDK, like Micrometer? By "separate SDK module", do you mean the AWS SDK?

debora-ito commented 1 year ago

We are thinking more like first-class support for observability tools, not through ExecutionInterceptor but as a setting at the client level, via a pluggable interface. But again, we have no concrete designs yet, it's just the idea.