AWS SDK

AWS SDK

rev. 703af49b7608996376f0414c2c5111bb1f2461f0

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-config/Cargo.toml

@@ -19,19 +79,79 @@
   39     39   
url = "2.5.4"
   40     40   
fastrand = "2.3.0"
   41     41   
   42     42   
[dependencies.aws-credential-types]
   43     43   
path = "../aws-credential-types"
   44     44   
features = ["test-util"]
   45     45   
version = "1.2.11"
   46     46   
   47     47   
[dependencies.aws-runtime]
   48     48   
path = "../aws-runtime"
   49         -
version = "1.5.17"
          49  +
version = "1.5.18"
   50     50   
   51     51   
[dependencies.aws-sdk-sts]
   52     52   
path = "../sts"
   53     53   
default-features = false
   54     54   
version = "0.0.0-local"
   55     55   
   56     56   
[dependencies.aws-smithy-async]
   57     57   
path = "../aws-smithy-async"
   58     58   
version = "1.2.7"
   59     59   

tmp-codegen-diff/aws-sdk/sdk/aws-runtime/Cargo.toml

@@ -1,1 +34,34 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-runtime"
    4         -
version = "1.5.17"
           4  +
version = "1.5.18"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
    6      6   
description = "Runtime support code for the AWS SDK. This crate isn't intended to be used directly."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
rust-version = "1.88"
   11     11   
[package.metadata.docs.rs]
   12     12   
all-features = true
   13     13   
targets = ["x86_64-unknown-linux-gnu"]
   14     14   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

tmp-codegen-diff/aws-sdk/sdk/aws-runtime/src/user_agent/metrics.rs

@@ -183,183 +242,243 @@
  203    203   
            }
  204    204   
            FlexibleChecksumsReqWhenRequired => {
  205    205   
                Some(BusinessMetric::FlexibleChecksumsReqWhenRequired)
  206    206   
            }
  207    207   
            FlexibleChecksumsResWhenSupported => {
  208    208   
                Some(BusinessMetric::FlexibleChecksumsResWhenSupported)
  209    209   
            }
  210    210   
            FlexibleChecksumsResWhenRequired => {
  211    211   
                Some(BusinessMetric::FlexibleChecksumsResWhenRequired)
  212    212   
            }
         213  +
            ObservabilityOtelMetrics => Some(BusinessMetric::ObservabilityOtelMetrics),
  213    214   
            otherwise => {
  214    215   
                // This may occur if a customer upgrades only the `aws-smithy-runtime-api` crate
  215    216   
                // while continuing to use an outdated version of an SDK crate or the `aws-runtime`
  216    217   
                // crate.
  217    218   
                tracing::warn!(
  218    219   
                    "Attempted to provide `BusinessMetric` for `{otherwise:?}`, which is not recognized in the current version of the `aws-runtime` crate. \
  219    220   
                    Consider upgrading to the latest version to ensure that all tracked features are properly reported in your metrics."
  220    221   
                );
  221    222   
                None
  222    223   
            }

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability-otel/Cargo.toml

@@ -2,2 +49,49 @@
   22     22   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   23     23   
rustdoc-args = ["--cfg", "docsrs"]
   24     24   
   25     25   
[dependencies]
   26     26   
value-bag = "1.10.0"
   27     27   
async-global-executor = "2.4.1"
   28     28   
async-task = "=4.7.1"
   29     29   
   30     30   
[dependencies.aws-smithy-observability]
   31     31   
path = "../aws-smithy-observability"
   32         -
version = "0.1.5"
          32  +
version = "0.1.6"
   33     33   
   34     34   
[dependencies.opentelemetry]
   35     35   
version = "0.26.0"
   36     36   
features = ["metrics"]
   37     37   
[target."cfg(not(target_arch = \"powerpc\"))".dependencies.opentelemetry_sdk]
   38     38   
version = "0.26.0"
   39     39   
features = ["metrics", "testing"]
   40     40   
   41     41   
[dev-dependencies]
   42     42   
stats_alloc = "0.1.10"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability-otel/src/meter.rs

@@ -259,259 +318,326 @@
  279    279   
            Ok(_) => Ok(()),
  280    280   
            Err(err) => Err(ObservabilityError::new(ErrorKind::Other, err)),
  281    281   
        }
  282    282   
    }
  283    283   
}
  284    284   
  285    285   
impl ProvideMeter for OtelMeterProvider {
  286    286   
    fn get_meter(&self, scope: &'static str, _attributes: Option<&Attributes>) -> Meter {
  287    287   
        Meter::new(Arc::new(MeterWrap(self.meter_provider.meter(scope))))
  288    288   
    }
         289  +
         290  +
    fn as_any(&self) -> &dyn std::any::Any {
         291  +
        self
         292  +
    }
         293  +
         294  +
    fn provider_name(&self) -> &'static str {
         295  +
        "otel"
         296  +
    }
  289    297   
}
  290    298   
  291    299   
#[cfg(test)]
  292    300   
mod tests {
  293    301   
  294    302   
    use std::sync::Arc;
  295    303   
  296    304   
    use aws_smithy_observability::instruments::AsyncMeasure;
  297    305   
    use aws_smithy_observability::{AttributeValue, Attributes, TelemetryProvider};
  298    306   
    use opentelemetry_sdk::metrics::{

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability/Cargo.toml

@@ -1,1 +21,21 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-observability"
    4         -
version = "0.1.5"
           4  +
version = "0.1.6"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
    6      6   
description = "Smithy observability implementation."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/awslabs/smithy-rs"
   10     10   
rust-version = "1.88"
   11     11   
[package.metadata.docs.rs]
   12     12   
all-features = true
   13     13   
targets = ["x86_64-unknown-linux-gnu"]
   14     14   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability/src/meter.rs

@@ -1,1 +49,59 @@
   10     10   
    AsyncInstrumentBuilder, AsyncMeasure, Histogram, InstrumentBuilder, MonotonicCounter,
   11     11   
    UpDownCounter,
   12     12   
};
   13     13   
use crate::{attributes::Attributes, instruments::ProvideInstrument};
   14     14   
use std::{borrow::Cow, fmt::Debug, sync::Arc};
   15     15   
   16     16   
/// Provides named instances of [Meter].
   17     17   
pub trait ProvideMeter: Send + Sync + Debug {
   18     18   
    /// Get or create a named [Meter].
   19     19   
    fn get_meter(&self, scope: &'static str, attributes: Option<&Attributes>) -> Meter;
          20  +
          21  +
    /// Returns a reference to `self` as `&dyn Any` for downcasting.
          22  +
    /// This allows type-based identification of meter providers.
          23  +
    fn as_any(&self) -> &dyn std::any::Any;
          24  +
          25  +
    /// Returns the name of this provider implementation.
          26  +
    /// This is used for feature tracking without requiring type imports.
          27  +
    fn provider_name(&self) -> &'static str {
          28  +
        "unknown"
          29  +
    }
   20     30   
}
   21     31   
   22     32   
/// The entry point to creating instruments. A grouping of related metrics.
   23     33   
#[derive(Clone)]
   24     34   
pub struct Meter {
   25     35   
    pub(crate) instrument_provider: Arc<dyn ProvideInstrument + Send + Sync>,
   26     36   
}
   27     37   
   28     38   
impl Meter {
   29     39   
    /// Create a new [Meter] from an [ProvideInstrument]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-observability/src/noop.rs

@@ -1,1 +56,64 @@
   17     17   
    context::Context,
   18     18   
    meter::{Meter, ProvideMeter},
   19     19   
};
   20     20   
   21     21   
#[derive(Debug)]
   22     22   
pub(crate) struct NoopMeterProvider;
   23     23   
impl ProvideMeter for NoopMeterProvider {
   24     24   
    fn get_meter(&self, _scope: &'static str, _attributes: Option<&Attributes>) -> Meter {
   25     25   
        Meter::new(Arc::new(NoopMeter))
   26     26   
    }
          27  +
          28  +
    fn as_any(&self) -> &dyn std::any::Any {
          29  +
        self
          30  +
    }
          31  +
          32  +
    fn provider_name(&self) -> &'static str {
          33  +
        "noop"
          34  +
    }
   27     35   
}
   28     36   
   29     37   
#[derive(Debug)]
   30     38   
pub(crate) struct NoopMeter;
   31     39   
impl ProvideInstrument for NoopMeter {
   32     40   
    fn create_gauge(
   33     41   
        &self,
   34     42   
        _builder: AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = f64>>, f64>,
   35     43   
    ) -> Arc<dyn AsyncMeasure<Value = f64>> {
   36     44   
        Arc::new(NoopAsyncMeasurement(PhantomData::<f64>))

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime/Cargo.toml

@@ -20,20 +80,80 @@
   40     40   
[dependencies.aws-smithy-async]
   41     41   
path = "../aws-smithy-async"
   42     42   
version = "1.2.7"
   43     43   
   44     44   
[dependencies.aws-smithy-http]
   45     45   
path = "../aws-smithy-http"
   46     46   
version = "0.62.6"
   47     47   
   48     48   
[dependencies.aws-smithy-observability]
   49     49   
path = "../aws-smithy-observability"
   50         -
version = "0.1.5"
          50  +
version = "0.1.6"
   51     51   
   52     52   
[dependencies.aws-smithy-runtime-api]
   53     53   
path = "../aws-smithy-runtime-api"
   54     54   
version = "1.9.3"
   55     55   
   56     56   
[dependencies.aws-smithy-types]
   57     57   
path = "../aws-smithy-types"
   58     58   
features = ["http-body-0-4-x"]
   59     59   
version = "1.3.5"
   60     60   

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-runtime/src/client/sdk_feature.rs

@@ -1,1 +30,32 @@
   16     16   
    RetryModeAdaptive,
   17     17   
    FlexibleChecksumsReqCrc32,
   18     18   
    FlexibleChecksumsReqCrc32c,
   19     19   
    FlexibleChecksumsReqCrc64,
   20     20   
    FlexibleChecksumsReqSha1,
   21     21   
    FlexibleChecksumsReqSha256,
   22     22   
    FlexibleChecksumsReqWhenSupported,
   23     23   
    FlexibleChecksumsReqWhenRequired,
   24     24   
    FlexibleChecksumsResWhenSupported,
   25     25   
    FlexibleChecksumsResWhenRequired,
          26  +
    /// Indicates that a Smithy SDK client has been configured with an OpenTelemetry metrics provider
          27  +
    ObservabilityOtelMetrics,
   26     28   
}
   27     29   
   28     30   
impl Storable for SmithySdkFeature {
   29     31   
    type Storer = StoreAppend<Self>;
   30     32   
}

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/Cargo.toml

@@ -1,1 +127,131 @@
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.11"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
features = ["event-stream"]
   25         -
version = "1.5.17"
          25  +
version = "1.5.18"
   26     26   
   27     27   
[dependencies.aws-sigv4]
   28     28   
path = "../aws-sigv4"
   29     29   
version = "1.3.7"
   30     30   
   31     31   
[dependencies.aws-smithy-async]
   32     32   
path = "../aws-smithy-async"
   33     33   
version = "1.2.7"
   34     34   
   35     35   
[dependencies.aws-smithy-eventstream]
   36     36   
path = "../aws-smithy-eventstream"
   37     37   
version = "0.60.14"
   38     38   
   39     39   
[dependencies.aws-smithy-http]
   40     40   
path = "../aws-smithy-http"
   41     41   
features = ["event-stream"]
   42     42   
version = "0.62.6"
   43     43   
   44     44   
[dependencies.aws-smithy-json]
   45     45   
path = "../aws-smithy-json"
   46     46   
version = "0.61.8"
   47     47   
          48  +
[dependencies.aws-smithy-observability]
          49  +
path = "../aws-smithy-observability"
          50  +
version = "0.1.6"
          51  +
   48     52   
[dependencies.aws-smithy-runtime]
   49     53   
path = "../aws-smithy-runtime"
   50     54   
features = ["client", "http-auth"]
   51     55   
version = "1.9.5"
   52     56   
   53     57   
[dependencies.aws-smithy-runtime-api]
   54     58   
path = "../aws-smithy-runtime-api"
   55     59   
features = ["client", "http-02x", "http-auth"]
   56     60   
version = "1.9.3"
   57     61   
   58     62   
[dependencies.aws-smithy-types]
   59     63   
path = "../aws-smithy-types"
   60     64   
features = ["http-body-0-4-x"]
   61     65   
version = "1.3.5"
   62     66   
   63     67   
[dependencies.aws-types]
   64     68   
path = "../aws-types"
   65     69   
version = "1.3.11"
   66     70   
   67     71   
[dependencies.bytes]
   68     72   
version = "1.4.0"
   69     73   
   70     74   
[dependencies.fastrand]
   71     75   
version = "2.0.0"
   72     76   
   73     77   
[dependencies.http]
   74     78   
version = "0.2.9"
   75     79   
   76     80   
[dependencies.hyper]
   77     81   
version = "0.14.26"
   78     82   
features = ["stream"]
   79     83   
   80     84   
[dependencies.regex-lite]
   81     85   
version = "0.1.5"
   82     86   
   83     87   
[dependencies.tracing]
   84     88   
version = "0.1"
   85     89   
[dev-dependencies.aws-config]
   86     90   
path = "../aws-config"
   87     91   
version = "1.8.12"
   88     92   
   89     93   
[dev-dependencies.aws-credential-types]
   90     94   
path = "../aws-credential-types"
   91     95   
features = ["test-util"]
   92     96   
version = "1.2.11"
   93     97   
   94     98   
[dev-dependencies.aws-runtime]
   95     99   
path = "../aws-runtime"
   96    100   
features = ["test-util"]
   97         -
version = "1.5.17"
         101  +
version = "1.5.18"
   98    102   
   99    103   
[dev-dependencies.aws-smithy-async]
  100    104   
path = "../aws-smithy-async"
  101    105   
features = ["test-util"]
  102    106   
version = "1.2.7"
  103    107   
  104    108   
[dev-dependencies.aws-smithy-eventstream]
  105    109   
path = "../aws-smithy-eventstream"
  106    110   
features = ["test-util"]
  107    111   
version = "0.60.14"

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/config.rs

@@ -1345,1345 +1404,1405 @@
 1365   1365   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1366   1366   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1367   1367   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1368   1368   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1369   1369   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1370   1370   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1371   1371   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1372   1372   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1373   1373   
        ));
 1374   1374   
        runtime_components.push_interceptor(crate::config::endpoint::EndpointOverrideFeatureTrackerInterceptor);
        1375  +
        runtime_components.push_interceptor(crate::observability_feature::ObservabilityFeatureTrackerInterceptor);
 1375   1376   
        Self { config, runtime_components }
 1376   1377   
    }
 1377   1378   
}
 1378   1379   
 1379   1380   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1380   1381   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1381   1382   
        self.config.clone()
 1382   1383   
    }
 1383   1384   
 1384   1385   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/lib.rs

@@ -168,168 +213,215 @@
  188    188   
pub mod types;
  189    189   
  190    190   
pub(crate) mod client_idempotency_token;
  191    191   
  192    192   
mod event_receiver;
  193    193   
  194    194   
mod event_stream_serde;
  195    195   
  196    196   
mod idempotency_token;
  197    197   
         198  +
mod observability_feature;
         199  +
  198    200   
pub(crate) mod protocol_serde;
  199    201   
  200    202   
mod sdk_feature_tracker;
  201    203   
  202    204   
mod serialization_settings;
  203    205   
  204    206   
mod endpoint_lib;
  205    207   
  206    208   
mod lens;
  207    209   

tmp-codegen-diff/aws-sdk/sdk/bedrockruntime/src/observability_feature.rs

@@ -0,1 +0,38 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature;
           8  +
use aws_smithy_runtime_api::{
           9  +
    box_error::BoxError,
          10  +
    client::interceptors::{context::BeforeSerializationInterceptorContextRef, Intercept},
          11  +
};
          12  +
use aws_smithy_types::config_bag::ConfigBag;
          13  +
          14  +
// Interceptor that tracks Smithy SDK features for observability (tracing/metrics).
          15  +
#[derive(Debug, Default)]
          16  +
pub(crate) struct ObservabilityFeatureTrackerInterceptor;
          17  +
          18  +
impl Intercept for ObservabilityFeatureTrackerInterceptor {
          19  +
    fn name(&self) -> &'static str {
          20  +
        "ObservabilityFeatureTrackerInterceptor"
          21  +
    }
          22  +
          23  +
    fn read_before_execution(&self, _context: &BeforeSerializationInterceptorContextRef<'_>, cfg: &mut ConfigBag) -> Result<(), BoxError> {
          24  +
        // Check if an OpenTelemetry meter provider is configured via the global provider
          25  +
        if let Ok(telemetry_provider) = aws_smithy_observability::global::get_telemetry_provider() {
          26  +
            let meter_provider = telemetry_provider.meter_provider();
          27  +
          28  +
            // Use provider_name() to detect OpenTelemetry without importing the otel crate.
          29  +
            // This avoids adding aws-smithy-observability-otel as a dependency.
          30  +
            // Note: as_any() is available for type-based checking if stronger guarantees are needed.
          31  +
            if meter_provider.provider_name() == "otel" {
          32  +
                cfg.interceptor_state().store_append(SmithySdkFeature::ObservabilityOtelMetrics);
          33  +
            }
          34  +
        }
          35  +
          36  +
        Ok(())
          37  +
    }
          38  +
}

tmp-codegen-diff/aws-sdk/sdk/cloudwatchlogs/Cargo.toml

@@ -1,1 +118,122 @@
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.11"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
features = ["event-stream"]
   25         -
version = "1.5.17"
          25  +
version = "1.5.18"
   26     26   
   27     27   
[dependencies.aws-smithy-async]
   28     28   
path = "../aws-smithy-async"
   29     29   
version = "1.2.7"
   30     30   
   31     31   
[dependencies.aws-smithy-eventstream]
   32     32   
path = "../aws-smithy-eventstream"
   33     33   
version = "0.60.14"
   34     34   
   35     35   
[dependencies.aws-smithy-http]
   36     36   
path = "../aws-smithy-http"
   37     37   
features = ["event-stream"]
   38     38   
version = "0.62.6"
   39     39   
   40     40   
[dependencies.aws-smithy-json]
   41     41   
path = "../aws-smithy-json"
   42     42   
version = "0.61.8"
   43     43   
          44  +
[dependencies.aws-smithy-observability]
          45  +
path = "../aws-smithy-observability"
          46  +
version = "0.1.6"
          47  +
   44     48   
[dependencies.aws-smithy-runtime]
   45     49   
path = "../aws-smithy-runtime"
   46     50   
features = ["client"]
   47     51   
version = "1.9.5"
   48     52   
   49     53   
[dependencies.aws-smithy-runtime-api]
   50     54   
path = "../aws-smithy-runtime-api"
   51     55   
features = ["client", "http-02x"]
   52     56   
version = "1.9.3"
   53     57   
   54     58   
[dependencies.aws-smithy-types]
   55     59   
path = "../aws-smithy-types"
   56     60   
version = "1.3.5"
   57     61   
   58     62   
[dependencies.aws-types]
   59     63   
path = "../aws-types"
   60     64   
version = "1.3.11"
   61     65   
   62     66   
[dependencies.bytes]
   63     67   
version = "1.4.0"
   64     68   
   65     69   
[dependencies.fastrand]
   66     70   
version = "2.0.0"
   67     71   
   68     72   
[dependencies.http]
   69     73   
version = "0.2.9"
   70     74   
   71     75   
[dependencies.regex-lite]
   72     76   
version = "0.1.5"
   73     77   
   74     78   
[dependencies.tracing]
   75     79   
version = "0.1"
   76     80   
[dev-dependencies.aws-config]
   77     81   
path = "../aws-config"
   78     82   
version = "1.8.12"
   79     83   
   80     84   
[dev-dependencies.aws-credential-types]
   81     85   
path = "../aws-credential-types"
   82     86   
features = ["test-util"]
   83     87   
version = "1.2.11"
   84     88   
   85     89   
[dev-dependencies.aws-runtime]
   86     90   
path = "../aws-runtime"
   87     91   
features = ["test-util"]
   88         -
version = "1.5.17"
          92  +
version = "1.5.18"
   89     93   
   90     94   
[dev-dependencies.aws-smithy-async]
   91     95   
path = "../aws-smithy-async"
   92     96   
features = ["test-util"]
   93     97   
version = "1.2.7"
   94     98   
   95     99   
[dev-dependencies.aws-smithy-eventstream]
   96    100   
path = "../aws-smithy-eventstream"
   97    101   
features = ["test-util"]
   98    102   
version = "0.60.14"