Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play client instrumentation throws exception #813

Closed
rtfpessoa opened this issue Jul 24, 2020 · 0 comments
Closed

Play client instrumentation throws exception #813

rtfpessoa opened this issue Jul 24, 2020 · 0 comments

Comments

@rtfpessoa
Copy link

rtfpessoa commented Jul 24, 2020

We are debugging a case where it seems like invoking this line https://github.com/kamon-io/Kamon/blob/master/instrumentation/kamon-play/src/main/scala/kamon/instrumentation/play/PlayClientInstrumentation.scala#L82
fails with this stacktrace:

java.net.URI$Parser.fail(URI.java:2848)
java.net.URI$Parser.checkChars(URI.java:3021)
java.net.URI$Parser.parseHierarchical(URI.java:3105)
java.net.URI$Parser.parse(URI.java:3053)
java.net.URI.<init>(URI.java:588)
play.api.libs.ws.ahc.StandaloneAhcWSRequest.uri$lzycompute(StandaloneAhcWSRequest.scala:61)
play.api.libs.ws.ahc.StandaloneAhcWSRequest.uri(StandaloneAhcWSRequest.scala:54)
kamon.instrumentation.play.WSClientUrlInterceptor$$anon$2.path(PlayClientInstrumentation.scala:82)
kamon.instrumentation.http.OperationNameSettings.operationName(OperationNameSettings.scala:9)
kamon.instrumentation.http.HttpClientInstrumentation$Default.createClientSpan(HttpClientInstrumentation.scala:135)
kamon.instrumentation.http.HttpClientInstrumentation$Default.createHandler(HttpClientInstrumentation.scala:105)
kamon.instrumentation.play.WSClientUrlInterceptor$$anon$1.apply(PlayClientInstrumentation.scala:43)
kamon.instrumentation.play.WSClientUrlInterceptor$$anon$1.apply(PlayClientInstrumentation.scala:40)
play.api.libs.ws.ahc.StandaloneAhcWSRequest.execute(StandaloneAhcWSRequest.scala:219)
play.api.libs.ws.ahc.StandaloneAhcWSRequest.execute(StandaloneAhcWSRequest.scala:207)
play.api.libs.ws.ahc.StandaloneAhcWSRequest.get(StandaloneAhcWSRequest.scala:145)

Any ideas why this can happen?
(It might be a bad url from our client that happens to work, investigating now)
The code doing the client call has this deps https://mvnrepository.com/artifact/com.codacy/bitbucket-scala-client_playjson27_2.12/14.0.0

Also, is there a way to make Kamon fail without crashing the call?

EDIT: Seems like the real problem was an invalid URLs but still I would like to see how we can make Kamon instrumentation independent from the execution.

Anyone has suggestions?

ivantopo added a commit that referenced this issue Aug 25, 2020
…eneration

guard against errors in the HTTP client request instrumentation, fixes #813
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant