remove redundant span attributes and improve log output format (#4075)
## Description https://github.com/smithy-lang/smithy-rs/pull/4052 aligned our spans closer to SRA but the output format resulted in `rpc.service` and `rpc.method` on both the new generated operation span and the internal orchestrator `invoke` span. This resulted in pretty long and clutter log output. This PR cleans up the log output a bit to have only the top level operation span include these attributes. This also fixes a subtle bug where presigned requests wouldn't contain the same top level operation span instrumentation because presigned requests make use of `<Operation>::orchestrate_with_stop_point` and not `<Operation>::orchestrate`. For IMDS and other "manually constructed" operations, I've moved the `invoke` span instrumentation into `Operation::invoke` to ensure we still capture that information in the logs for those use cases. Example output format: ``` 2025-03-28T14:44:02.471068Z DEBUG S3.ListBuckets{rpc.service="S3" rpc.method="ListBuckets" sdk_invocation_id=4073472 rpc.system="aws-api"}:try_op: aws_smithy_runtime::cli ent::orchestrator: beginning attempt #1 ``` ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the `.changelog` directory, specifying "client," "server," or both in the `applies_to` key. ---- _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