AWS SDK

AWS SDK

rev. 02e7b8399b284d0da0663fba1446cf7c52e6b096

Files changed:

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-legacy-http/src/urlencode.rs

@@ -1,0 +61,0 @@
    1         -
/*
    2         -
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3         -
 * SPDX-License-Identifier: Apache-2.0
    4         -
 */
    5         -
    6         -
use percent_encoding::{AsciiSet, CONTROLS};
    7         -
    8         -
/// base set of characters that must be URL encoded
    9         -
pub(crate) const BASE_SET: &AsciiSet = &CONTROLS
   10         -
    .add(b' ')
   11         -
    .add(b'/')
   12         -
    // RFC-3986 ยง3.3 allows sub-delims (defined in section2.2) to be in the path component.
   13         -
    // This includes both colon ':' and comma ',' characters.
   14         -
    // Smithy protocol tests & AWS services percent encode these expected values. Signing
   15         -
    // will fail if these values are not percent encoded
   16         -
    .add(b':')
   17         -
    .add(b',')
   18         -
    .add(b'?')
   19         -
    .add(b'#')
   20         -
    .add(b'[')
   21         -
    .add(b']')
   22         -
    .add(b'{')
   23         -
    .add(b'}')
   24         -
    .add(b'|')
   25         -
    .add(b'@')
   26         -
    .add(b'!')
   27         -
    .add(b'$')
   28         -
    .add(b'&')
   29         -
    .add(b'\'')
   30         -
    .add(b'(')
   31         -
    .add(b')')
   32         -
    .add(b'*')
   33         -
    .add(b'+')
   34         -
    .add(b';')
   35         -
    .add(b'=')
   36         -
    .add(b'%')
   37         -
    .add(b'<')
   38         -
    .add(b'>')
   39         -
    .add(b'"')
   40         -
    .add(b'^')
   41         -
    .add(b'`')
   42         -
    .add(b'\\');
   43         -
   44         -
#[cfg(test)]
   45         -
mod test {
   46         -
    use crate::urlencode::BASE_SET;
   47         -
    use percent_encoding::utf8_percent_encode;
   48         -
   49         -
    #[test]
   50         -
    fn set_includes_mandatory_characters() {
   51         -
        let chars = ":/?#[]@!$&'()*+,;=%";
   52         -
        let escaped = utf8_percent_encode(chars, BASE_SET).to_string();
   53         -
        assert_eq!(
   54         -
            escaped,
   55         -
            "%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D%25"
   56         -
        );
   57         -
   58         -
        // sanity check that every character is escaped
   59         -
        assert_eq!(escaped.len(), chars.len() * 3);
   60         -
    }
   61         -
}

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

@@ -259,259 +318,322 @@
  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  +
    }
  289    293   
}
  290    294   
  291    295   
#[cfg(test)]
  292    296   
mod tests {
  293    297   
  294    298   
    use std::sync::Arc;
  295    299   
  296    300   
    use aws_smithy_observability::instruments::AsyncMeasure;
  297    301   
    use aws_smithy_observability::{AttributeValue, Attributes, TelemetryProvider};
  298    302   
    use opentelemetry_sdk::metrics::{

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

@@ -1,1 +49,52 @@
   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  +
    fn as_any(&self) -> &dyn std::any::Any;
   20     23   
}
   21     24   
   22     25   
/// The entry point to creating instruments. A grouping of related metrics.
   23     26   
#[derive(Clone)]
   24     27   
pub struct Meter {
   25     28   
    pub(crate) instrument_provider: Arc<dyn ProvideInstrument + Send + Sync>,
   26     29   
}
   27     30   
   28     31   
impl Meter {
   29     32   
    /// Create a new [Meter] from an [ProvideInstrument]

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

@@ -1,1 +56,60 @@
   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  +
    }
   27     31   
}
   28     32   
   29     33   
#[derive(Debug)]
   30     34   
pub(crate) struct NoopMeter;
   31     35   
impl ProvideInstrument for NoopMeter {
   32     36   
    fn create_gauge(
   33     37   
        &self,
   34     38   
        _builder: AsyncInstrumentBuilder<'_, Arc<dyn AsyncMeasure<Value = f64>>, f64>,
   35     39   
    ) -> Arc<dyn AsyncMeasure<Value = f64>> {
   36     40   
        Arc::new(NoopAsyncMeasurement(PhantomData::<f64>))

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,135 @@
   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.5"
          51  +
          52  +
[dependencies.aws-smithy-observability-otel]
          53  +
path = "../aws-smithy-observability-otel"
          54  +
version = "0.1.3"
          55  +
   48     56   
[dependencies.aws-smithy-runtime]
   49     57   
path = "../aws-smithy-runtime"
   50     58   
features = ["client", "http-auth"]
   51     59   
version = "1.9.5"
   52     60   
   53     61   
[dependencies.aws-smithy-runtime-api]
   54     62   
path = "../aws-smithy-runtime-api"
   55     63   
features = ["client", "http-02x", "http-auth"]
   56     64   
version = "1.9.3"
   57     65   
   58     66   
[dependencies.aws-smithy-types]
   59     67   
path = "../aws-smithy-types"
   60     68   
features = ["http-body-0-4-x"]
   61     69   
version = "1.3.5"
   62     70   
   63     71   
[dependencies.aws-types]
   64     72   
path = "../aws-types"
   65     73   
version = "1.3.11"
   66     74   
   67     75   
[dependencies.bytes]
   68     76   
version = "1.4.0"
   69     77   
   70     78   
[dependencies.fastrand]
   71     79   
version = "2.0.0"
   72     80   
   73     81   
[dependencies.http]
   74     82   
version = "0.2.9"
   75     83   
   76     84   
[dependencies.hyper]
   77     85   
version = "0.14.26"
   78     86   
features = ["stream"]
   79     87   
   80     88   
[dependencies.regex-lite]
   81     89   
version = "0.1.5"
   82     90   
   83     91   
[dependencies.tracing]
   84     92   
version = "0.1"
   85     93   
[dev-dependencies.aws-config]
   86     94   
path = "../aws-config"
   87     95   
version = "1.8.12"
   88     96   
   89     97   
[dev-dependencies.aws-credential-types]
   90     98   
path = "../aws-credential-types"
   91     99   
features = ["test-util"]
   92    100   
version = "1.2.11"
   93    101   
   94    102   
[dev-dependencies.aws-runtime]
   95    103   
path = "../aws-runtime"
   96    104   
features = ["test-util"]
   97         -
version = "1.5.17"
         105  +
version = "1.5.18"
   98    106   
   99    107   
[dev-dependencies.aws-smithy-async]
  100    108   
path = "../aws-smithy-async"
  101    109   
features = ["test-util"]
  102    110   
version = "1.2.7"
  103    111   
  104    112   
[dev-dependencies.aws-smithy-eventstream]
  105    113   
path = "../aws-smithy-eventstream"
  106    114   
features = ["test-util"]
  107    115   
version = "0.60.14"

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

@@ -1344,1344 +1403,1404 @@
 1364   1364   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 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  +
        runtime_components.push_interceptor(crate::observability_feature::ObservabilityFeatureTrackerInterceptor);
 1374   1375   
        Self { config, runtime_components }
 1375   1376   
    }
 1376   1377   
}
 1377   1378   
 1378   1379   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1379   1380   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1380   1381   
        self.config.clone()
 1381   1382   
    }
 1382   1383   
 1383   1384   
    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,40 @@
           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 downcast to check if it's specifically the OTel implementation
          29  +
            // This is more reliable than string matching on type names
          30  +
            if let Some(_otel_provider) = meter_provider
          31  +
                .as_any()
          32  +
                .downcast_ref::<aws_smithy_observability_otel::meter::OtelMeterProvider>()
          33  +
            {
          34  +
                cfg.interceptor_state().store_append(SmithySdkFeature::ObservabilityOtelMetrics);
          35  +
            }
          36  +
        }
          37  +
          38  +
        Ok(())
          39  +
    }
          40  +
}

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

@@ -1,1 +118,126 @@
   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.5"
          47  +
          48  +
[dependencies.aws-smithy-observability-otel]
          49  +
path = "../aws-smithy-observability-otel"
          50  +
version = "0.1.3"
          51  +
   44     52   
[dependencies.aws-smithy-runtime]
   45     53   
path = "../aws-smithy-runtime"
   46     54   
features = ["client"]
   47     55   
version = "1.9.5"
   48     56   
   49     57   
[dependencies.aws-smithy-runtime-api]
   50     58   
path = "../aws-smithy-runtime-api"
   51     59   
features = ["client", "http-02x"]
   52     60   
version = "1.9.3"
   53     61   
   54     62   
[dependencies.aws-smithy-types]
   55     63   
path = "../aws-smithy-types"
   56     64   
version = "1.3.5"
   57     65   
   58     66   
[dependencies.aws-types]
   59     67   
path = "../aws-types"
   60     68   
version = "1.3.11"
   61     69   
   62     70   
[dependencies.bytes]
   63     71   
version = "1.4.0"
   64     72   
   65     73   
[dependencies.fastrand]
   66     74   
version = "2.0.0"
   67     75   
   68     76   
[dependencies.http]
   69     77   
version = "0.2.9"
   70     78   
   71     79   
[dependencies.regex-lite]
   72     80   
version = "0.1.5"
   73     81   
   74     82   
[dependencies.tracing]
   75     83   
version = "0.1"
   76     84   
[dev-dependencies.aws-config]
   77     85   
path = "../aws-config"
   78     86   
version = "1.8.12"
   79     87   
   80     88   
[dev-dependencies.aws-credential-types]
   81     89   
path = "../aws-credential-types"
   82     90   
features = ["test-util"]
   83     91   
version = "1.2.11"
   84     92   
   85     93   
[dev-dependencies.aws-runtime]
   86     94   
path = "../aws-runtime"
   87     95   
features = ["test-util"]
   88         -
version = "1.5.17"
          96  +
version = "1.5.18"
   89     97   
   90     98   
[dev-dependencies.aws-smithy-async]
   91     99   
path = "../aws-smithy-async"
   92    100   
features = ["test-util"]
   93    101   
version = "1.2.7"
   94    102   
   95    103   
[dev-dependencies.aws-smithy-eventstream]
   96    104   
path = "../aws-smithy-eventstream"
   97    105   
features = ["test-util"]
   98    106   
version = "0.60.14"

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

@@ -1295,1295 +1354,1355 @@
 1315   1315   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1316   1316   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1317   1317   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1318   1318   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1319   1319   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1320   1320   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1321   1321   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1322   1322   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1323   1323   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1324   1324   
        ));
        1325  +
        runtime_components.push_interceptor(crate::observability_feature::ObservabilityFeatureTrackerInterceptor);
 1325   1326   
        Self { config, runtime_components }
 1326   1327   
    }
 1327   1328   
}
 1328   1329   
 1329   1330   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1330   1331   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1331   1332   
        self.config.clone()
 1332   1333   
    }
 1333   1334   
 1334   1335   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

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

@@ -171,171 +218,220 @@
  191    191   
  192    192   
/// Data structures used by operation inputs/outputs.
  193    193   
pub mod types;
  194    194   
  195    195   
pub(crate) mod client_idempotency_token;
  196    196   
  197    197   
mod event_receiver;
  198    198   
  199    199   
mod idempotency_token;
  200    200   
         201  +
mod observability_feature;
         202  +
  201    203   
pub(crate) mod protocol_serde;
  202    204   
  203    205   
mod sdk_feature_tracker;
  204    206   
  205    207   
mod serialization_settings;
  206    208   
  207    209   
mod endpoint_lib;
  208    210   
  209    211   
mod lens;
  210    212   

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

@@ -0,1 +0,40 @@
           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 downcast to check if it's specifically the OTel implementation
          29  +
            // This is more reliable than string matching on type names
          30  +
            if let Some(_otel_provider) = meter_provider
          31  +
                .as_any()
          32  +
                .downcast_ref::<aws_smithy_observability_otel::meter::OtelMeterProvider>()
          33  +
            {
          34  +
                cfg.interceptor_state().store_append(SmithySdkFeature::ObservabilityOtelMetrics);
          35  +
            }
          36  +
        }
          37  +
          38  +
        Ok(())
          39  +
    }
          40  +
}

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

@@ -1,1 +112,120 @@
   14     14   
protocol = "aws.protocols#restJson1"
   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         -
version = "1.5.17"
          24  +
version = "1.5.18"
   25     25   
   26     26   
[dependencies.aws-smithy-async]
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.7"
   29     29   
   30     30   
[dependencies.aws-smithy-http]
   31     31   
path = "../aws-smithy-http"
   32     32   
version = "0.62.6"
   33     33   
   34     34   
[dependencies.aws-smithy-json]
   35     35   
path = "../aws-smithy-json"
   36     36   
version = "0.61.8"
   37     37   
          38  +
[dependencies.aws-smithy-observability]
          39  +
path = "../aws-smithy-observability"
          40  +
version = "0.1.5"
          41  +
          42  +
[dependencies.aws-smithy-observability-otel]
          43  +
path = "../aws-smithy-observability-otel"
          44  +
version = "0.1.3"
          45  +
   38     46   
[dependencies.aws-smithy-runtime]
   39     47   
path = "../aws-smithy-runtime"
   40     48   
features = ["client", "http-auth"]
   41     49   
version = "1.9.5"
   42     50   
   43     51   
[dependencies.aws-smithy-runtime-api]
   44     52   
path = "../aws-smithy-runtime-api"
   45     53   
features = ["client", "http-02x", "http-auth"]
   46     54   
version = "1.9.3"
   47     55   
   48     56   
[dependencies.aws-smithy-types]
   49     57   
path = "../aws-smithy-types"
   50     58   
version = "1.3.5"
   51     59   
   52     60   
[dependencies.aws-types]
   53     61   
path = "../aws-types"
   54     62   
version = "1.3.11"
   55     63   
   56     64   
[dependencies.bytes]
   57     65   
version = "1.4.0"
   58     66   
   59     67   
[dependencies.fastrand]
   60     68   
version = "2.0.0"
   61     69   
   62     70   
[dependencies.http]
   63     71   
version = "0.2.9"
   64     72   
   65     73   
[dependencies.regex-lite]
   66     74   
version = "0.1.5"
   67     75   
   68     76   
[dependencies.tracing]
   69     77   
version = "0.1"
   70     78   
[dev-dependencies.aws-config]
   71     79   
path = "../aws-config"
   72     80   
version = "1.8.12"
   73     81   
   74     82   
[dev-dependencies.aws-credential-types]
   75     83   
path = "../aws-credential-types"
   76     84   
features = ["test-util"]
   77     85   
version = "1.2.11"
   78     86   
   79     87   
[dev-dependencies.aws-runtime]
   80     88   
path = "../aws-runtime"
   81     89   
features = ["test-util"]
   82         -
version = "1.5.17"
          90  +
version = "1.5.18"
   83     91   
   84     92   
[dev-dependencies.aws-smithy-async]
   85     93   
path = "../aws-smithy-async"
   86     94   
features = ["test-util"]
   87     95   
version = "1.2.7"
   88     96   
   89     97   
[dev-dependencies.aws-smithy-http-client]
   90     98   
path = "../aws-smithy-http-client"
   91     99   
features = ["test-util", "wire-mock"]
   92    100   
version = "1.1.5"

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

@@ -1293,1293 +1352,1353 @@
 1313   1313   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1314   1314   
        }));
 1315   1315   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 1316   1316   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1317   1317   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1318   1318   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1319   1319   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1320   1320   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1321   1321   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1322   1322   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
        1323  +
        runtime_components.push_interceptor(crate::observability_feature::ObservabilityFeatureTrackerInterceptor);
 1323   1324   
        Self { config, runtime_components }
 1324   1325   
    }
 1325   1326   
}
 1326   1327   
 1327   1328   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1328   1329   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1329   1330   
        self.config.clone()
 1330   1331   
    }
 1331   1332   
 1332   1333   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

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

@@ -214,214 +259,261 @@
  234    234   
/// Primitives such as `Blob` or `DateTime` used by other types.
  235    235   
pub mod primitives;
  236    236   
  237    237   
/// Data structures used by operation inputs/outputs.
  238    238   
pub mod types;
  239    239   
  240    240   
pub(crate) mod client_idempotency_token;
  241    241   
  242    242   
mod idempotency_token;
  243    243   
         244  +
mod observability_feature;
         245  +
  244    246   
pub(crate) mod protocol_serde;
  245    247   
  246    248   
mod sdk_feature_tracker;
  247    249   
  248    250   
mod serialization_settings;
  249    251   
  250    252   
mod endpoint_lib;
  251    253   
  252    254   
mod lens;
  253    255