Skip to content

Commit

Permalink
Support Spring Boot 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
y-tane committed Feb 5, 2024
1 parent e1024dd commit 2782acc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ subprojects {
val servletApiVersion by extra { "6.0.0" }

// Following versions are based on spring-boot
val springBootVersion by extra { "3.0.0" }
val springBootVersion by extra { "3.2.2" }
val springVersion by extra { "6.0.0" }
val apacheHttpClientVersion by extra { "4.5.8" }
val okHttpClientVersion by extra { "4.8.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class M3TracingHttpRequestInterceptor(
override fun intercept(request: HttpRequest, body: ByteArray, execution: ClientHttpRequestExecution): ClientHttpResponse {
return tracer.processOutgoingHttpRequest(wrapRequest(request)).use { span ->
span["client"] = "RestTemplate"
span["method"] = request.methodValue
span["method"] = request.method.toString()
span["uri"] = request.uri.toString()
execution.execute(request, body).also { response ->
span["status"] = response.rawStatusCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open class SpringHttpRequestInfo(protected val req: HttpRequest): HttpRequestInf

@Suppress("UNCHECKED_CAST", "IMPLICIT_ANY")
override fun <T> tryGetMetadata(key: HttpRequestMetadataKey<T>): T? = when(key) {
HttpRequestMetadataKey.Method -> req.methodValue as T?
HttpRequestMetadataKey.Method -> req.method.toString() as T?
HttpRequestMetadataKey.Host -> req.headers.host?.hostName as T?
HttpRequestMetadataKey.ContentLength -> req.headers.contentLength.let { if (it <= 0) null else it } as T?
HttpRequestMetadataKey.Path -> req.uri.path as T?
Expand Down

0 comments on commit 2782acc

Please sign in to comment.