AWS SDK

AWS SDK

rev. b6dc1d298ba698070286e6838abdd213fcbce093 (ignoring whitespace)

Files changed:

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("Config Service", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("Config Service", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1305,1305 +1364,1365 @@
 1325   1325   
            use crate::config::endpoint::ResolveEndpoint;
 1326   1326   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1327   1327   
        }));
 1328   1328   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 1329   1329   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1330   1330   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1331   1331   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1332   1332   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1333   1333   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1334   1334   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
        1335  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1335   1336   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1336   1337   
        runtime_components.push_interceptor(crate::account_id_endpoint::AccountIdEndpointFeatureTrackerInterceptor);
 1337   1338   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1338   1339   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1339   1340   
        ));
 1340   1341   
        Self { config, runtime_components }
 1341   1342   
    }
 1342   1343   
}
 1343   1344   
 1344   1345   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
@@ -1396,1397 +1455,1468 @@
 1416   1417   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1417   1418   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1418   1419   
 1419   1420   
pub use ::aws_credential_types::Credentials;
 1420   1421   
 1421   1422   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1422   1423   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1423   1424   
        let mut builder = Builder::default();
 1424   1425   
        builder.set_credentials_provider(input.credentials_provider());
 1425   1426   
        builder = builder.region(input.region().cloned());
        1427  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1428  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1429  +
        let has_service_specific_endpoint = input
        1430  +
            .service_config()
        1431  +
            .and_then(|conf| conf.load_config(service_config_key("DynamoDB", "AWS_ENDPOINT_URL", "endpoint_url")))
        1432  +
            .is_some();
        1433  +
        1434  +
        if has_global_endpoint || has_service_specific_endpoint {
        1435  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1436  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1437  +
            ));
        1438  +
        }
 1426   1439   
        builder.set_use_fips(input.use_fips());
 1427   1440   
        builder.set_use_dual_stack(input.use_dual_stack());
 1428   1441   
        if input.get_origin("endpoint_url").is_client_config() {
 1429   1442   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1430   1443   
        } else {
 1431   1444   
            builder.set_endpoint_url(
 1432   1445   
                input
 1433   1446   
                    .service_config()
 1434   1447   
                    .and_then(|conf| {
 1435   1448   
                        conf.load_config(service_config_key("DynamoDB", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1291,1291 +1350,1351 @@
 1311   1311   
            use crate::config::endpoint::ResolveEndpoint;
 1312   1312   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1313   1313   
        }));
 1314   1314   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1321   1322   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1322   1323   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1323   1324   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1324   1325   
        ));
 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> {
@@ -1381,1382 +1440,1453 @@
 1401   1402   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1402   1403   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1403   1404   
 1404   1405   
pub use ::aws_credential_types::Credentials;
 1405   1406   
 1406   1407   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1407   1408   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1408   1409   
        let mut builder = Builder::default();
 1409   1410   
        builder.set_credentials_provider(input.credentials_provider());
 1410   1411   
        builder = builder.region(input.region().cloned());
        1412  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1413  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1414  +
        let has_service_specific_endpoint = input
        1415  +
            .service_config()
        1416  +
            .and_then(|conf| conf.load_config(service_config_key("EC2", "AWS_ENDPOINT_URL", "endpoint_url")))
        1417  +
            .is_some();
        1418  +
        1419  +
        if has_global_endpoint || has_service_specific_endpoint {
        1420  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1421  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1422  +
            ));
        1423  +
        }
 1411   1424   
        builder.set_use_fips(input.use_fips());
 1412   1425   
        builder.set_use_dual_stack(input.use_dual_stack());
 1413   1426   
        if input.get_origin("endpoint_url").is_client_config() {
 1414   1427   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1415   1428   
        } else {
 1416   1429   
            builder.set_endpoint_url(
 1417   1430   
                input
 1418   1431   
                    .service_config()
 1419   1432   
                    .and_then(|conf| {
 1420   1433   
                        conf.load_config(service_config_key("EC2", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1291,1291 +1350,1351 @@
 1311   1311   
            use crate::config::endpoint::ResolveEndpoint;
 1312   1312   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1313   1313   
        }));
 1314   1314   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1321   1322   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1322   1323   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1323   1324   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1324   1325   
        ));
 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> {
@@ -1381,1382 +1440,1453 @@
 1401   1402   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1402   1403   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1403   1404   
 1404   1405   
pub use ::aws_credential_types::Credentials;
 1405   1406   
 1406   1407   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1407   1408   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1408   1409   
        let mut builder = Builder::default();
 1409   1410   
        builder.set_credentials_provider(input.credentials_provider());
 1410   1411   
        builder = builder.region(input.region().cloned());
        1412  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1413  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1414  +
        let has_service_specific_endpoint = input
        1415  +
            .service_config()
        1416  +
            .and_then(|conf| conf.load_config(service_config_key("ECS", "AWS_ENDPOINT_URL", "endpoint_url")))
        1417  +
            .is_some();
        1418  +
        1419  +
        if has_global_endpoint || has_service_specific_endpoint {
        1420  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1421  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1422  +
            ));
        1423  +
        }
 1411   1424   
        builder.set_use_fips(input.use_fips());
 1412   1425   
        builder.set_use_dual_stack(input.use_dual_stack());
 1413   1426   
        if input.get_origin("endpoint_url").is_client_config() {
 1414   1427   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1415   1428   
        } else {
 1416   1429   
            builder.set_endpoint_url(
 1417   1430   
                input
 1418   1431   
                    .service_config()
 1419   1432   
                    .and_then(|conf| {
 1420   1433   
                        conf.load_config(service_config_key("ECS", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1274,1274 +1333,1334 @@
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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(crate::glacier_interceptors::GlacierApiVersionInterceptor::new("2012-06-01"));
 1303   1303   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
        1304  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1305   1306   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1306   1307   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1307   1308   
        ));
 1308   1309   
        Self { config, runtime_components }
 1309   1310   
    }
 1310   1311   
}
 1311   1312   
 1312   1313   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1313   1314   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
@@ -1364,1365 +1423,1436 @@
 1384   1385   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1385   1386   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1386   1387   
 1387   1388   
pub use ::aws_credential_types::Credentials;
 1388   1389   
 1389   1390   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1390   1391   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1391   1392   
        let mut builder = Builder::default();
 1392   1393   
        builder.set_credentials_provider(input.credentials_provider());
 1393   1394   
        builder = builder.region(input.region().cloned());
        1395  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1396  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1397  +
        let has_service_specific_endpoint = input
        1398  +
            .service_config()
        1399  +
            .and_then(|conf| conf.load_config(service_config_key("Glacier", "AWS_ENDPOINT_URL", "endpoint_url")))
        1400  +
            .is_some();
        1401  +
        1402  +
        if has_global_endpoint || has_service_specific_endpoint {
        1403  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1404  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1405  +
            ));
        1406  +
        }
 1394   1407   
        builder.set_use_fips(input.use_fips());
 1395   1408   
        builder.set_use_dual_stack(input.use_dual_stack());
 1396   1409   
        if input.get_origin("endpoint_url").is_client_config() {
 1397   1410   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1398   1411   
        } else {
 1399   1412   
            builder.set_endpoint_url(
 1400   1413   
                input
 1401   1414   
                    .service_config()
 1402   1415   
                    .and_then(|conf| {
 1403   1416   
                        conf.load_config(service_config_key("Glacier", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("IAM", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("IAM", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("KMS", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("KMS", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("Lambda", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("Lambda", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("Polly", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("Polly", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("Route 53", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("Route 53", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1425,1425 +1484,1485 @@
 1445   1445   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 1446   1446   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1447   1447   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1448   1448   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1449   1449   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1450   1450   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1451   1451   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1452   1452   
            crate::s3_express::auth::S3ExpressAuthScheme::new(),
 1453   1453   
        ));
 1454   1454   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
        1455  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1455   1456   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1456   1457   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1457   1458   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1458   1459   
        ));
 1459   1460   
        #[cfg(feature = "sigv4a")]
 1460   1461   
        {
 1461   1462   
            runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1462   1463   
                ::aws_runtime::auth::sigv4a::SigV4aAuthScheme::new(),
 1463   1464   
            ));
 1464   1465   
        }
@@ -1521,1522 +1580,1593 @@
 1541   1542   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1542   1543   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1543   1544   
 1544   1545   
pub use ::aws_credential_types::Credentials;
 1545   1546   
 1546   1547   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1547   1548   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1548   1549   
        let mut builder = Builder::default();
 1549   1550   
        builder.set_credentials_provider(input.credentials_provider());
 1550   1551   
        builder = builder.region(input.region().cloned());
        1552  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1553  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1554  +
        let has_service_specific_endpoint = input
        1555  +
            .service_config()
        1556  +
            .and_then(|conf| conf.load_config(service_config_key("S3", "AWS_ENDPOINT_URL", "endpoint_url")))
        1557  +
            .is_some();
        1558  +
        1559  +
        if has_global_endpoint || has_service_specific_endpoint {
        1560  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1561  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1562  +
            ));
        1563  +
        }
 1551   1564   
        builder.set_request_checksum_calculation(input.request_checksum_calculation());
 1552   1565   
        builder.set_response_checksum_validation(input.response_checksum_validation());
 1553   1566   
        builder.set_use_fips(input.use_fips());
 1554   1567   
        builder.set_use_dual_stack(input.use_dual_stack());
 1555   1568   
        if input.get_origin("endpoint_url").is_client_config() {
 1556   1569   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1557   1570   
        } else {
 1558   1571   
            builder.set_endpoint_url(
 1559   1572   
                input
 1560   1573   
                    .service_config()

tmp-codegen-diff/aws-sdk/sdk/s3/tests/business_metrics.rs

@@ -1,0 +63,0 @@
    1         -
/*
    2         -
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
    3         -
 * SPDX-License-Identifier: Apache-2.0
    4         -
 */
    5         -
    6         -
use aws_config::Region;
    7         -
use aws_runtime::{
    8         -
    sdk_feature::AwsSdkFeature, user_agent::test_util::assert_ua_contains_metric_values,
    9         -
};
   10         -
use aws_sdk_s3::{
   11         -
    config::{Intercept, IntoShared},
   12         -
    primitives::ByteStream,
   13         -
    Client, Config,
   14         -
};
   15         -
use aws_smithy_http_client::test_util::capture_request;
   16         -
   17         -
#[derive(Debug)]
   18         -
struct TransferManagerFeatureInterceptor;
   19         -
   20         -
impl Intercept for TransferManagerFeatureInterceptor {
   21         -
    fn name(&self) -> &'static str {
   22         -
        "TransferManagerFeature"
   23         -
    }
   24         -
   25         -
    fn read_before_execution(
   26         -
        &self,
   27         -
        _ctx: &aws_sdk_s3::config::interceptors::BeforeSerializationInterceptorContextRef<'_>,
   28         -
        cfg: &mut aws_sdk_s3::config::ConfigBag,
   29         -
    ) -> Result<(), aws_sdk_s3::error::BoxError> {
   30         -
        cfg.interceptor_state()
   31         -
            .store_append(AwsSdkFeature::S3Transfer);
   32         -
        Ok(())
   33         -
    }
   34         -
}
   35         -
   36         -
#[tokio::test]
   37         -
async fn test_track_metric_for_s3_transfer_manager() {
   38         -
    let (http_client, captured_request) = capture_request(None);
   39         -
    let mut conf_builder = Config::builder()
   40         -
        .region(Region::new("us-east-1"))
   41         -
        .http_client(http_client.clone())
   42         -
        .with_test_defaults();
   43         -
    // The S3 Transfer Manager uses a passed-in S3 client SDK for operations.
   44         -
    // By configuring an interceptor at the client level to track metrics,
   45         -
    // all operations executed by the client will automatically include the metric.
   46         -
    // This eliminates the need to apply `.config_override` on individual operations
   47         -
    // to insert the `TransferManagerFeatureInterceptor`.
   48         -
    conf_builder.push_interceptor(TransferManagerFeatureInterceptor.into_shared());
   49         -
    let client = Client::from_conf(conf_builder.build());
   50         -
   51         -
    let _ = client
   52         -
        .put_object()
   53         -
        .bucket("doesnotmatter")
   54         -
        .key("doesnotmatter")
   55         -
        .body(ByteStream::from_static("Hello, world".as_bytes()))
   56         -
        .send()
   57         -
        .await
   58         -
        .unwrap();
   59         -
   60         -
    let expected_req = captured_request.expect_request();
   61         -
    let user_agent = expected_req.headers().get("x-amz-user-agent").unwrap();
   62         -
    assert_ua_contains_metric_values(user_agent, &["G"]);
   63         -
}

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

@@ -1302,1302 +1361,1362 @@
 1322   1322   
            use crate::config::endpoint::ResolveEndpoint;
 1323   1323   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1324   1324   
        }));
 1325   1325   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 1326   1326   
        runtime_components.push_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::HttpStatusCodeClassifier::default());
 1327   1327   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1328   1328   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1329   1329   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1330   1330   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1331   1331   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
        1332  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1332   1333   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1333   1334   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1334   1335   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1335   1336   
        ));
 1336   1337   
        Self { config, runtime_components }
 1337   1338   
    }
 1338   1339   
}
 1339   1340   
 1340   1341   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1341   1342   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
@@ -1392,1393 +1451,1464 @@
 1412   1413   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1413   1414   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1414   1415   
 1415   1416   
pub use ::aws_credential_types::Credentials;
 1416   1417   
 1417   1418   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1418   1419   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1419   1420   
        let mut builder = Builder::default();
 1420   1421   
        builder.set_credentials_provider(input.credentials_provider());
 1421   1422   
        builder = builder.region(input.region().cloned());
        1423  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1424  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1425  +
        let has_service_specific_endpoint = input
        1426  +
            .service_config()
        1427  +
            .and_then(|conf| conf.load_config(service_config_key("S3 Control", "AWS_ENDPOINT_URL", "endpoint_url")))
        1428  +
            .is_some();
        1429  +
        1430  +
        if has_global_endpoint || has_service_specific_endpoint {
        1431  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1432  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1433  +
            ));
        1434  +
        }
 1422   1435   
        builder.set_use_fips(input.use_fips());
 1423   1436   
        builder.set_use_dual_stack(input.use_dual_stack());
 1424   1437   
        if input.get_origin("endpoint_url").is_client_config() {
 1425   1438   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1426   1439   
        } else {
 1427   1440   
            builder.set_endpoint_url(
 1428   1441   
                input
 1429   1442   
                    .service_config()
 1430   1443   
                    .and_then(|conf| {
 1431   1444   
                        conf.load_config(service_config_key("S3 Control", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("Signin", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("Signin", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("SSO", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("SSO", "AWS_ENDPOINT_URL", "endpoint_url"))

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

@@ -1273,1273 +1332,1333 @@
 1293   1293   
            use crate::config::endpoint::ResolveEndpoint;
 1294   1294   
            crate::config::endpoint::DefaultResolver::new().into_shared_resolver()
 1295   1295   
        }));
 1296   1296   
        runtime_components.push_interceptor(::aws_smithy_runtime::client::http::connection_poisoning::ConnectionPoisoningInterceptor::new());
 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  +
        runtime_components.push_interceptor(::aws_runtime::observability_detection::ObservabilityDetectionInterceptor::new());
 1303   1304   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1305   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1306   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1307   
        ));
 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> {
@@ -1363,1364 +1422,1435 @@
 1383   1384   
pub use ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponents;
 1384   1385   
pub use ::aws_smithy_types::config_bag::ConfigBag;
 1385   1386   
 1386   1387   
pub use ::aws_credential_types::Credentials;
 1387   1388   
 1388   1389   
impl From<&::aws_types::sdk_config::SdkConfig> for Builder {
 1389   1390   
    fn from(input: &::aws_types::sdk_config::SdkConfig) -> Self {
 1390   1391   
        let mut builder = Builder::default();
 1391   1392   
        builder.set_credentials_provider(input.credentials_provider());
 1392   1393   
        builder = builder.region(input.region().cloned());
        1394  +
        // Track endpoint override metric if endpoint URL is configured from any source
        1395  +
        let has_global_endpoint = input.endpoint_url().is_some();
        1396  +
        let has_service_specific_endpoint = input
        1397  +
            .service_config()
        1398  +
            .and_then(|conf| conf.load_config(service_config_key("SSO OIDC", "AWS_ENDPOINT_URL", "endpoint_url")))
        1399  +
            .is_some();
        1400  +
        1401  +
        if has_global_endpoint || has_service_specific_endpoint {
        1402  +
            builder.push_runtime_plugin(::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin::new(
        1403  +
                ::aws_runtime::endpoint_override::EndpointOverrideRuntimePlugin::new_with_feature_flag(),
        1404  +
            ));
        1405  +
        }
 1393   1406   
        builder.set_use_fips(input.use_fips());
 1394   1407   
        builder.set_use_dual_stack(input.use_dual_stack());
 1395   1408   
        if input.get_origin("endpoint_url").is_client_config() {
 1396   1409   
            builder.set_endpoint_url(input.endpoint_url().map(|s| s.to_string()));
 1397   1410   
        } else {
 1398   1411   
            builder.set_endpoint_url(
 1399   1412   
                input
 1400   1413   
                    .service_config()
 1401   1414   
                    .and_then(|conf| {
 1402   1415   
                        conf.load_config(service_config_key("SSO OIDC", "AWS_ENDPOINT_URL", "endpoint_url"))