-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I am trying to capture spans for specific methods using the Java agent feature described here. However, I am encountering issues when the method arguments include Kotlin value classes, as the spans are not captured properly.
Steps to reproduce
@JvmInline
value class UserId(val id: Int)package com.example.trace.grpc.usecase
import com.example.trace.grpc.domain.model.User
import com.example.trace.grpc.domain.model.UserId
import com.example.trace.grpc.repository.UserRepository
import org.springframework.stereotype.Component
@Component
class GetUserUseCase(
private val userRepository: UserRepository
) {
suspend fun getUser(userId: Int): User {
return userRepository.getUser(userId)
}
suspend fun getUserWithValueClass(userId: UserId): User {
return userRepository.getUser(userId.id)
}
}otel.instrumentation.methods.include=com.example.trace.grpc.usecase.GetUserUseCase[getUser,getUserWithValueClass]
We can capture a span for the getUser method but not for the getUserWithValueClass method.
Expected behavior
We expect to capture spans even when the method arguments include Kotlin value classes."
Actual behavior
We can't capture the spans when the method arguments include Kotlin value classes.
Javaagent or library instrumentation version
javaagent: v2.11.0
Environment
JDK: Temurin 21.0.5+11
Kotlin: 2.1.0
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working