Skip to content

Commit 25fe4ed

Browse files
committed
Fix httpPost API change in 2025.3
Changed from lambda-based to ByteArray-based overload to avoid scope confusion with CoroutineScope in nested lambda context.
1 parent de9b0d8 commit 25fe4ed

File tree

1 file changed

+3
-3
lines changed
  • plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/services/telemetry/otel

1 file changed

+3
-3
lines changed

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/services/telemetry/otel/OTelService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ private class BasicOtlpSpanProcessor(
5050
coroutineScope.launch {
5151
try {
5252
val item = TraceRequestMarshaler.create(listOf(data))
53+
val output = ByteArrayOutputStream()
54+
item.writeBinaryTo(output)
5355

54-
httpPost(traceUrl, contentLength = item.binarySerializedSize.toLong(), contentType = ContentType.XProtobuf) {
55-
item.writeBinaryTo(this)
56-
}
56+
httpPost(traceUrl, contentType = ContentType.XProtobuf, body = output.toByteArray())
5757
} catch (e: CancellationException) {
5858
throw e
5959
} catch (e: ConnectException) {

0 commit comments

Comments
 (0)