AWS SDK

AWS SDK

rev. fd8f5872be2db6c5b8cfe56c2ef4fb19d0024a51

Files changed:

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

@@ -0,1 +0,37 @@
           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  +
            // Check the provider name to detect OpenTelemetry without importing the otel crate
          29  +
            // This avoids compilation issues with the opentelemetry dependency
          30  +
            if meter_provider.provider_name() == "otel" {
          31  +
                cfg.interceptor_state().store_append(SmithySdkFeature::ObservabilityOtelMetrics);
          32  +
            }
          33  +
        }
          34  +
          35  +
        Ok(())
          36  +
    }
          37  +
}

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

@@ -1,1 +130,134 @@
   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"]
   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"]
   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.async-stream]
   86     90   
version = "0.3.0"
   87     91   
   88     92   
[dev-dependencies.aws-config]
   89     93   
path = "../aws-config"
   90     94   
version = "1.8.12"
   91     95   
   92     96   
[dev-dependencies.aws-credential-types]
   93     97   
path = "../aws-credential-types"
   94     98   
features = ["test-util"]
   95     99   
version = "1.2.11"
   96    100   
   97    101   
[dev-dependencies.aws-runtime]
   98    102   
path = "../aws-runtime"
   99    103   
features = ["test-util"]
  100         -
version = "1.5.17"
         104  +
version = "1.5.18"
  101    105   
  102    106   
[dev-dependencies.aws-smithy-async]
  103    107   
path = "../aws-smithy-async"
  104    108   
features = ["test-util"]
  105    109   
version = "1.2.7"
  106    110   
  107    111   
[dev-dependencies.aws-smithy-eventstream]
  108    112   
path = "../aws-smithy-eventstream"
  109    113   
features = ["test-util"]
  110    114   
version = "0.60.14"

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

@@ -1277,1277 +1336,1337 @@
 1297   1297   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1298   1298   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1299   1299   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1300   1300   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1301   1301   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1302   1302   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1303   1303   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1304   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1305   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1306   
        ));
        1307  +
        runtime_components.push_interceptor(crate::observability_feature::ObservabilityFeatureTrackerInterceptor);
 1307   1308   
        Self { config, runtime_components }
 1308   1309   
    }
 1309   1310   
}
 1310   1311   
 1311   1312   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1312   1313   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1313   1314   
        self.config.clone()
 1314   1315   
    }
 1315   1316   
 1316   1317   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

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

@@ -168,168 +211,213 @@
  188    188   
/// Primitives such as `Blob` or `DateTime` used by other types.
  189    189   
pub mod primitives;
  190    190   
  191    191   
/// Data structures used by operation inputs/outputs.
  192    192   
pub mod types;
  193    193   
  194    194   
mod event_receiver;
  195    195   
  196    196   
mod event_stream_serde;
  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 json_errors;
  207    209   

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

@@ -0,1 +0,37 @@
           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  +
            // Check the provider name to detect OpenTelemetry without importing the otel crate
          29  +
            // This avoids compilation issues with the opentelemetry dependency
          30  +
            if meter_provider.provider_name() == "otel" {
          31  +
                cfg.interceptor_state().store_append(SmithySdkFeature::ObservabilityOtelMetrics);
          32  +
            }
          33  +
        }
          34  +
          35  +
        Ok(())
          36  +
    }
          37  +
}

tmp-codegen-diff/aws-sdk/tests/telemetry/Cargo.toml

@@ -5,5 +60,60 @@
   25     25   
features = ["test-util", "behavior-version-latest"]
   26     26   
version = "0.0.0-local"
   27     27   
   28     28   
[dev-dependencies.aws-sdk-s3]
   29     29   
path = "../../sdk/s3"
   30     30   
features = ["test-util", "behavior-version-latest"]
   31     31   
version = "0.0.0-local"
   32     32   
   33     33   
[dev-dependencies.aws-smithy-observability]
   34     34   
path = "../../sdk/aws-smithy-observability"
   35         -
version = "0.1.5"
          35  +
version = "0.1.6"
   36     36   
   37     37   
[dev-dependencies.aws-smithy-observability-otel]
   38     38   
path = "../../sdk/aws-smithy-observability-otel"
   39     39   
version = "0.1.3"
   40     40   
   41     41   
[dev-dependencies.aws-smithy-runtime]
   42     42   
path = "../../sdk/aws-smithy-runtime"
   43     43   
features = ["client", "test-util"]
   44     44   
version = "1.9.5"
   45     45