Skip to content

Commit e48ccee

Browse files
committed
Fix ktlint formatting, downgrade opentelemetry to 0.24.0, and remove unused observability metrics
1 parent 869532b commit e48ccee

File tree

8 files changed

+27
-34
lines changed

8 files changed

+27
-34
lines changed

aws/rust-runtime/Cargo.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/rust-runtime/aws-runtime/src/user_agent/metrics.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ iterable_enum!(
165165
SsoLoginDevice,
166166
SsoLoginAuth,
167167
BearerServiceEnvVars,
168-
ObservabilityTracing,
169-
ObservabilityMetrics,
170-
ObservabilityOtelTracing,
171168
ObservabilityOtelMetrics,
172169
CredentialsCognito,
173170
S3TransferUploadDirectory,

aws/rust-runtime/aws-runtime/src/user_agent/test_data/feature_id_to_metric_value.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,13 @@
5555
"SSO_LOGIN_DEVICE": "1",
5656
"SSO_LOGIN_AUTH": "2",
5757
"BEARER_SERVICE_ENV_VARS": "3",
58-
"OBSERVABILITY_TRACING" : "4",
59-
"OBSERVABILITY_METRICS" : "5",
60-
"OBSERVABILITY_OTEL_TRACING" : "6",
61-
"OBSERVABILITY_OTEL_METRICS" : "7",
62-
"CREDENTIALS_COGNITO" : "8",
63-
"S3_TRANSFER_UPLOAD_DIRECTORY" : "9",
64-
"S3_TRANSFER_DOWNLOAD_DIRECTORY": "+",
65-
"CLI_V1_TO_V2_MIGRATION_DEBUG_MODE" : "-",
66-
"LOGIN_SAME_DEVICE" : "AA",
67-
"LOGIN_CROSS_DEVICE" : "AB",
68-
"CREDENTIALS_PROFILE_LOGIN": "AC",
69-
"CREDENTIALS_LOGIN": "AD"
58+
"OBSERVABILITY_OTEL_METRICS": "4",
59+
"CREDENTIALS_COGNITO": "5",
60+
"S3_TRANSFER_UPLOAD_DIRECTORY": "6",
61+
"S3_TRANSFER_DOWNLOAD_DIRECTORY": "7",
62+
"CLI_V1_TO_V2_MIGRATION_DEBUG_MODE": "8",
63+
"LOGIN_SAME_DEVICE": "9",
64+
"LOGIN_CROSS_DEVICE": "+",
65+
"CREDENTIALS_PROFILE_LOGIN": "-",
66+
"CREDENTIALS_LOGIN": "AA"
7067
}

aws/sdk/integration-tests/dynamodb/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ bytes = "1.0.0"
3030
futures-util = { version = "0.3.29", default-features = false }
3131
http = "0.2"
3232
http-1x = { package = "http", version = "1" }
33-
opentelemetry = "0.26.0"
34-
opentelemetry_sdk = { version = "0.26.0", features = ["testing", "rt-tokio"] }
33+
opentelemetry = "0.24.0"
34+
opentelemetry_sdk = { version = "0.24.0", features = ["testing", "rt-tokio"] }
3535
serde_json = "1.0.0"
3636
tokio = { version = "1.23.1", features = ["full", "test-util"] }
3737
tokio-stream = "0.1.5"

aws/sdk/integration-tests/dynamodb/tests/observability-metrics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async fn observability_metrics_in_user_agent() {
5252

5353
// Should NOT contain observability metrics when using noop provider
5454
let ua_str = user_agent.to_str().unwrap();
55-
assert!(!ua_str.contains("m/7")); // OBSERVABILITY_OTEL_METRICS = "7"
55+
assert!(!ua_str.contains("m/4")); // OBSERVABILITY_OTEL_METRICS = "4"
5656
}
5757

5858
// Test case 2: OpenTelemetry metrics provider configured
@@ -78,7 +78,7 @@ async fn observability_metrics_in_user_agent() {
7878
let user_agent = req.headers().get("x-amz-user-agent").unwrap();
7979

8080
// Should contain OBSERVABILITY_OTEL_METRICS metric
81-
assert_ua_contains_metric_values(user_agent.to_str().unwrap(), &["7"]);
81+
assert_ua_contains_metric_values(user_agent.to_str().unwrap(), &["4"]);
8282

8383
// Reset to noop for other tests
8484
aws_smithy_observability::global::set_telemetry_provider(TelemetryProvider::noop())

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/CargoDependency.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,11 @@ data class CargoDependency(
413413
fun smithyMocks(runtimeConfig: RuntimeConfig) =
414414
runtimeConfig.smithyRuntimeCrate("smithy-mocks", scope = DependencyScope.Dev)
415415

416-
fun smithyObservability(runtimeConfig: RuntimeConfig) = runtimeConfig.smithyRuntimeCrate("smithy-observability")
416+
fun smithyObservability(runtimeConfig: RuntimeConfig) =
417+
runtimeConfig.smithyRuntimeCrate("smithy-observability")
417418

418-
fun smithyObservabilityOtel(runtimeConfig: RuntimeConfig) = runtimeConfig.smithyRuntimeCrate("smithy-observability-otel")
419+
fun smithyObservabilityOtel(runtimeConfig: RuntimeConfig) =
420+
runtimeConfig.smithyRuntimeCrate("smithy-observability-otel")
419421

420422
// behind feature-gate
421423
val Serde =

rust-runtime/Cargo.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust-runtime/aws-smithy-observability-otel/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ rust-version = "1.88"
1212

1313
[dependencies]
1414
aws-smithy-observability = { path = "../aws-smithy-observability" }
15-
opentelemetry = {version = "0.26.0", features = ["metrics"]}
16-
thiserror = "2.0" # Required by opentelemetry 0.26.0 but not declared
15+
opentelemetry = {version = "0.24.0", features = ["metrics"]}
1716
# The following dependencies are transitive and pinned for build
1817
# compatability purposes
1918
value-bag = "1.10.0"
@@ -22,7 +21,7 @@ async-task = "=4.7.1"
2221

2322
# This crate cannot be used on powerpc
2423
[target.'cfg(not(target_arch = "powerpc"))'.dependencies]
25-
opentelemetry_sdk = {version = "0.26.0", features = ["metrics", "testing"]}
24+
opentelemetry_sdk = {version = "0.24.0", features = ["metrics", "testing"]}
2625

2726
[dev-dependencies]
2827
tokio = { version = "1.23.1" }

0 commit comments

Comments
 (0)