Add invocation ID to root level “invoke” operation span (#3671)
## Motivation and Context The `invoke` debug span now includes invocation IDs for operation invocations. It is a random unique ID per client and shared across retries for the same operation. Example debug trace output with the changes in this PR: ``` 2024-05-29T17:50:22.230526Z DEBUG invoke{service=s3 operation=ListObjectsV2 sdk_invocation_id=4652364}:try_op:try_attempt: aws_smithy_runtime_api::client::interceptors::context: entering 'before deserialization' phase ``` ## Description Note that this invocation ID is currently for internal use only to improve debuggability when looking at logs (usually with customers). Note also that the invocation ID is not related to [that used in amz-sdk-invocation-id](https://github.com/smithy-lang/smithy-rs/pull/2626) (we [attempted to make it related](https://github.com/smithy-lang/smithy-rs/pull/3661) but decided to go for this two-way door approach). In sum, this PR is meant to be simple, and if we are to augment the functionality (e.g. make the ID configurable or make it related to that in `amz-sdk-invocation-id`), we can do so without breaking anything. ## Testing Relies on the existing tests in CI ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
Loading
Please register or sign in to comment