aws / aws/aws-sdk-java-v2

Add way to prevent expected exceptions from being recorded as errors in open telemetry spans

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

Descrizione

### Describe the feature

Currently, if there is an an error like a conditional check failure (400), this appears to get recorded with span.setStatus(Status.ERROR) and it's very challenging to try to undo that. This causes us a bunch of error spam that we would love to eliminate because these are errors that are expected and not unexpected ones. I completely understand not wanting this behavior to be the default, but just some optional config to allow us to provide a list of exception classes to ignore from setting the span to an error status would be great. Or an override callback to return a desired status based on some parameters would also be acceptable

### Use Case

Working with open telemetry and avoiding unnecessary error noise

### Proposed Solution

At a simplest level, just allowing us to specify a list of error classes (or even fully qualified class names) would be all that is needed. I could imagine more complicated and flexible solutions that involve callbacks, but those wouldn't be strictly necessary for us.

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

### JDK version used

21.0.10

### Operating System and version

MacOS 26.5

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.