Skip to content

Commit af41ebf

Browse files
authored
fix: revert business metrics (#1333)
1 parent 6e4ce48 commit af41ebf

File tree

10 files changed

+5
-295
lines changed

10 files changed

+5
-295
lines changed

aws-runtime/aws-http/api/aws-http.api

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public final class aws/sdk/kotlin/runtime/http/AwsUserAgentMetadata$Companion {
4848
public final class aws/sdk/kotlin/runtime/http/AwsUserAgentMetadataKt {
4949
public static final field AWS_APP_ID_ENV Ljava/lang/String;
5050
public static final field AWS_APP_ID_PROP Ljava/lang/String;
51-
public static final field BUSINESS_METRICS_MAX_LENGTH I
5251
}
5352

5453
public final class aws/sdk/kotlin/runtime/http/ExecutionEnvMetadata {
@@ -140,14 +139,6 @@ public final class aws/sdk/kotlin/runtime/http/interceptors/AddUserAgentMetadata
140139
public fun readBeforeTransmit (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;)V
141140
}
142141

143-
public final class aws/sdk/kotlin/runtime/http/interceptors/AwsBusinessMetric : java/lang/Enum, aws/smithy/kotlin/runtime/businessmetrics/BusinessMetric {
144-
public static final field S3_EXPRESS_BUCKET Laws/sdk/kotlin/runtime/http/interceptors/AwsBusinessMetric;
145-
public static fun getEntries ()Lkotlin/enums/EnumEntries;
146-
public fun getIdentifier ()Ljava/lang/String;
147-
public static fun valueOf (Ljava/lang/String;)Laws/sdk/kotlin/runtime/http/interceptors/AwsBusinessMetric;
148-
public static fun values ()[Laws/sdk/kotlin/runtime/http/interceptors/AwsBusinessMetric;
149-
}
150-
151142
public final class aws/sdk/kotlin/runtime/http/interceptors/AwsSpanInterceptor : aws/smithy/kotlin/runtime/client/Interceptor {
152143
public static final field INSTANCE Laws/sdk/kotlin/runtime/http/interceptors/AwsSpanInterceptor;
153144
public fun modifyBeforeAttemptCompletion-gIAlu-s (Laws/smithy/kotlin/runtime/client/ResponseInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@@ -171,29 +162,6 @@ public final class aws/sdk/kotlin/runtime/http/interceptors/AwsSpanInterceptor :
171162
public fun readBeforeTransmit (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;)V
172163
}
173164

174-
public final class aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor : aws/smithy/kotlin/runtime/client/Interceptor {
175-
public fun <init> ()V
176-
public fun modifyBeforeAttemptCompletion-gIAlu-s (Laws/smithy/kotlin/runtime/client/ResponseInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
177-
public fun modifyBeforeCompletion-gIAlu-s (Laws/smithy/kotlin/runtime/client/ResponseInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
178-
public fun modifyBeforeDeserialization (Laws/smithy/kotlin/runtime/client/ProtocolResponseInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
179-
public fun modifyBeforeRetryLoop (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
180-
public fun modifyBeforeSerialization (Laws/smithy/kotlin/runtime/client/RequestInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
181-
public fun modifyBeforeSigning (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
182-
public fun modifyBeforeTransmit (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
183-
public fun readAfterAttempt (Laws/smithy/kotlin/runtime/client/ResponseInterceptorContext;)V
184-
public fun readAfterDeserialization (Laws/smithy/kotlin/runtime/client/ResponseInterceptorContext;)V
185-
public fun readAfterExecution (Laws/smithy/kotlin/runtime/client/ResponseInterceptorContext;)V
186-
public fun readAfterSerialization (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;)V
187-
public fun readAfterSigning (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;)V
188-
public fun readAfterTransmit (Laws/smithy/kotlin/runtime/client/ProtocolResponseInterceptorContext;)V
189-
public fun readBeforeAttempt (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;)V
190-
public fun readBeforeDeserialization (Laws/smithy/kotlin/runtime/client/ProtocolResponseInterceptorContext;)V
191-
public fun readBeforeExecution (Laws/smithy/kotlin/runtime/client/RequestInterceptorContext;)V
192-
public fun readBeforeSerialization (Laws/smithy/kotlin/runtime/client/RequestInterceptorContext;)V
193-
public fun readBeforeSigning (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;)V
194-
public fun readBeforeTransmit (Laws/smithy/kotlin/runtime/client/ProtocolRequestInterceptorContext;)V
195-
}
196-
197165
public final class aws/sdk/kotlin/runtime/http/interceptors/UnsupportedSigningAlgorithmInterceptor : aws/smithy/kotlin/runtime/client/Interceptor {
198166
public fun <init> ()V
199167
public fun modifyBeforeAttemptCompletion-gIAlu-s (Laws/smithy/kotlin/runtime/client/ResponseInterceptorContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/AwsUserAgentMetadata.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import kotlin.jvm.JvmInline
1414

1515
internal const val AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"
1616
public const val AWS_APP_ID_ENV: String = "AWS_SDK_UA_APP_ID"
17-
private const val USER_AGENT_SPEC_VERSION = "2.1"
18-
public const val BUSINESS_METRICS_MAX_LENGTH: Int = 1024
1917

2018
// non-standard environment variables/properties
2119
public const val AWS_APP_ID_PROP: String = "aws.userAgentAppId"
@@ -67,7 +65,7 @@ public data class AwsUserAgentMetadata(
6765
get() = buildList {
6866
add(sdkMetadata)
6967
customMetadata?.extras?.takeIf { it.containsKey("internal") }?.let { add("md/internal") }
70-
add(uaPair("ua", USER_AGENT_SPEC_VERSION))
68+
add(uaPair("ua", "2.0")) // User agent specification version 2.0
7169
add(apiMetadata)
7270
add(osMetadata)
7371
add(languageMetadata)

aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptor.kt

Lines changed: 0 additions & 67 deletions
This file was deleted.

aws-runtime/aws-http/common/test/aws/sdk/kotlin/runtime/http/AwsUserAgentMetadataTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AwsUserAgentMetadataTest {
4545
val expected = listOf(
4646
"aws-sdk-kotlin/1.2.3",
4747
"md/internal",
48-
"ua/2.1",
48+
"ua/2.0",
4949
"api/test-service#1.2.3",
5050
"os/linux#ubuntu-20.04",
5151
"lang/kotlin#1.4.31",

aws-runtime/aws-http/common/test/aws/sdk/kotlin/runtime/http/interceptors/BusinessMetricsInterceptorTest.kt

Lines changed: 0 additions & 118 deletions
This file was deleted.

aws-runtime/aws-http/common/test/aws/sdk/kotlin/runtime/http/middleware/UserAgentTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class UserAgentTest {
4747
assertTrue(request.headers.contains(X_AMZ_USER_AGENT))
4848
assertEquals("aws-sdk-kotlin/1.2.3", request.headers[X_AMZ_USER_AGENT])
4949
assertTrue(
50-
request.headers[USER_AGENT]!!.startsWith("aws-sdk-kotlin/1.2.3 ua/2.1 api/test-service#1.2.3"),
50+
request.headers[USER_AGENT]!!.startsWith("aws-sdk-kotlin/1.2.3 ua/2.0 api/test-service#1.2.3"),
5151
"$USER_AGENT header didn't start with expected value. Found: ${request.headers[USER_AGENT]}",
5252
)
5353
}

codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/AwsRuntimeTypes.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ object AwsRuntimeTypes {
6060
object Interceptors : RuntimeTypePackage(AwsKotlinDependency.AWS_HTTP, "interceptors") {
6161
val AddUserAgentMetadataInterceptor = symbol("AddUserAgentMetadataInterceptor")
6262
val UnsupportedSigningAlgorithmInterceptor = symbol("UnsupportedSigningAlgorithmInterceptor")
63-
val BusinessMetricsInterceptor = symbol("BusinessMetricsInterceptor")
64-
val AwsBusinessMetric = symbol("AwsBusinessMetric")
6563
}
6664

6765
object Retries {

codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/BusinessMetricsIntegration.kt

Lines changed: 0 additions & 68 deletions
This file was deleted.

codegen/aws-sdk-codegen/src/main/resources/META-INF/services/software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ aws.sdk.kotlin.codegen.customization.cloudfrontkeyvaluestore.BackfillSigV4ACusto
4242
aws.sdk.kotlin.codegen.customization.s3.express.SigV4S3ExpressAuthSchemeIntegration
4343
aws.sdk.kotlin.codegen.customization.s3.express.S3ExpressIntegration
4444
aws.sdk.kotlin.codegen.customization.s3.S3ExpiresIntegration
45-
aws.sdk.kotlin.codegen.BusinessMetricsIntegration

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ coroutines-version = "1.7.3"
99
atomicfu-version = "0.23.1"
1010

1111
# smithy-kotlin codegen and runtime are versioned separately
12-
smithy-kotlin-runtime-version = "1.2.9"
13-
smithy-kotlin-codegen-version = "0.32.9"
12+
smithy-kotlin-runtime-version = "1.2.7"
13+
smithy-kotlin-codegen-version = "0.32.7"
1414

1515
# codegen
1616
smithy-version = "1.49.0"

0 commit comments

Comments
 (0)