Skip to content

Capture http.route for akka-http#10039

Merged
trask merged 4 commits into
open-telemetry:mainfrom
laurit:akka-http-route
Dec 12, 2023
Merged

Capture http.route for akka-http#10039
trask merged 4 commits into
open-telemetry:mainfrom
laurit:akka-http-route

Conversation

@laurit

@laurit laurit commented Dec 8, 2023

Copy link
Copy Markdown
Contributor

When akka-http routing dsl (https://doc.akka.io/docs/akka-http/current/routing-dsl/index.html) is used we can construct http.route as the elements in the dsl are matched. We capture the matched textual elements and / and replace all other matched segments with *

@laurit
laurit marked this pull request as ready for review December 8, 2023 17:18
@laurit
laurit requested a review from a team December 8, 2023 17:18

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really clever, nicely done!

laurit and others added 2 commits December 9, 2023 14:22
…/opentelemetry/javaagent/instrumentation/akkahttp/server/route/PathMatcherInstrumentation.java

Co-authored-by: jason plumb <[email protected]>
@trask
trask merged commit 14dc34e into open-telemetry:main Dec 12, 2023
@trask

trask commented Dec 12, 2023

Copy link
Copy Markdown
Member

nice

@laurit
laurit deleted the akka-http-route branch December 14, 2023 12:29
@tomsfernandez

Copy link
Copy Markdown

Hi @laurit! Do you think this is backportable to the 1.x line? I can do the work needed.

github-actions Bot pushed a commit that referenced this pull request Mar 7, 2024
@trask

trask commented Mar 7, 2024

Copy link
Copy Markdown
Member

Hi @laurit! Do you think this is backportable to the 1.x line? I can do the work needed.

looks like it cleanly backported (assuming tests pass): #10777

@trask

trask commented Mar 7, 2024

Copy link
Copy Markdown
Member

@tomsfernandez can you send a PR against the #10777 PR branch to fix CI? looks like it needs some updates related to the new semconv changes

samwright added a commit to samwright/opentelemetry-java-instrumentation that referenced this pull request Mar 11, 2024
All credit goes to @laurit for doing this for akka in PR open-telemetry#10039. I'm just copying it for pekko (the open-source fork of akka).
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

Successfully merging this pull request may close these issues.

4 participants