aws / aws/aws-sdk-cpp

Tracing miss span context with transfer manager or thread executor

Open
#2,732 1 comment 0 reactions 0 assignees View on GitHub
feature-request p3
Dominant language
C++
Stars
2.2k
Forks
1.2k
Avg merge
3d 14h
Merged PRs (30d)
12

Description

### Describe the feature

Current implementation of tracing creates a span context from opentelemetry::context::RuntimeContext::GetCurrent()
This is a thread_local stack of previous span context.

When getting an object through the transfer manager or with GetObjectCallable or GetObjectAsync the span will be created from another thread than the one doing the request.
There is no way to link or give the right parent to the span created in S3Client::GetObject.

Could you provide a way to propagate the right context like opentelemetry propagator is doing between client / server with http headers?

### Use Case

I can't correlate smithy tracing span in S3Client GetObject with my code
Exemple:
```
main thread thread executor
| Span A |(application)
| Span B | (TransferManager::DownloadFile)
| Span D | (Proccess Data) | Span C | (GetObject)
```

### Proposed Solution

_No response_

### Other Information

_No response_

### Acknowledgements

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

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.