Skip to content
Snippets Groups Projects
Select Git revision
  • 7c9c283a389f73d77cbc9c445b8a980422543ae5
  • main default protected
  • release-2025-06-11-with-patches protected
  • release-2025-05-15-with-patches protected
  • release-2025-03-27-with-patches protected
  • release-2024-12-30-with-client-builder protected
  • release-2024-12-26-with-client-builder protected
  • release-2024-11-05-with-client-builder protected
  • release-2024-08-16-with-client-builder protected
  • release-2024-09-09-with-client-builder protected
  • release-2024-08-28-with-client-builder protected
  • release-2024-10-09-with-client-builder protected
  • sbuttgereit/expose_client_builder_with_hyper_1_0
  • release-2025-06-11
  • release-2025-06-03
  • release-2025-05-19
  • release-2025-05-15
  • release-2025-05-09
  • release-2025-05-02
  • release-2025-04-23
  • release-2025-03-27
  • release-2025-03-25
  • release-2025-03-10
  • release-2025-03-04
  • release-2025-02-20
  • release-2025-02-12
  • release-2025-02-03
  • release-2025-01-28
  • release-2025-01-23
  • release-2025-01-17
  • release-2025-01-14
  • release-2024-12-30
  • release-2024-12-26
33 results

smithy-rs

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    ysaito1001 authored and GitHub committed
    ## Motivation and Context
    Adds `Metadata` to a config layer through `OperationRuntimePlugin`.
    
    ## Description
    We have had a customer's use case where a service name and a operation
    name are obtained from
    [Metadata](https://github.com/awslabs/smithy-rs/blob/ddba46086a9754c01f3b11d7521c49d4489de84b/rust-runtime/aws-smithy-http/src/operation.rs#L17-L22
    
    ).
    The end goal was to use their names as part of metrics collection.
    Previously, it was done using `map_operation` on a
    `CustomizableOperation`, e.g.
    ```
    client
        .some_operation()
        .customize()
        .await?
        .map_operation(|operation| {
            operation.try_clone().map(|operation| {
                let (_, parts) = operation.into_request_response();
                parts.metadata.map(|metadata| {
                    let service_name = metadata.service().to_string().to_uppercase();
                    let operation_name = metadata.name().to_string();
                    /*
                     * do something with `service_name` and `operation_name`
                     */
                })
            });
    
            Ok(operation)
        })?
        .send()
        .await;
    ```
    The orchestrator no longer supports `map_operation` on
    `CustomizableOperation`. We therefore add `Metadata` to a config layer
    through `OperationRuntimePlugin`. See the added integration test for how
    `Metadata` is retrieved from within an interceptor.
    
    ## Testing
    Added an integration-test to verify `Metadata` is properly set.
    
    ----
    
    _By submitting this pull request, I confirm that you can use, modify,
    copy, and redistribute this contribution, under the terms of your
    choice._
    
    ---------
    
    Co-authored-by: default avatarysaito1001 <awsaito@amazon.com>
    Co-authored-by: default avatarZelda Hessler <zhessler@amazon.com>
    7c9c283a
    History
    Name Last commit Last update