-
Notifications
You must be signed in to change notification settings - Fork 845
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
Put http.route
attribute onto http.server.duration
on Play framework request processing
#7801
Put http.route
attribute onto http.server.duration
on Play framework request processing
#7801
Commits on Feb 11, 2023
-
Put
http_route
attribute ontohttp_server_duration
on Play framew……ork request processing Basically, `akka-http` instrumenter has the responsibility to instrument the `http_server_duration`, but the current implementation has not marked the `http_route` attribute. ref: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/8e8161cb2e5b27d78b8afb7872df17cfa25a2f74/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaHttpServerAttributesGetter.java#L59 Actually, it's hard to record that attribute by only the akka-http layer because that library's request object doesn't hold the route information, e.g. placeholder. So this patch delegates that job to the `play` instrumenter and when that has been able to get the route info, the instrumenter puts `http_route` attribute onto `http_server_duration`. For example, when the routes configuration of the Play is like the following: ``` GET /foo/:bar controllers.HomeController.doSomething(bar: String) ``` and when it tries to access that API, then OTEL instruments like so: ```prometheus http_server_duration_count{otel_scope_name="io.opentelemetry.akka-http-10.0",otel_scope_version="1.23.0-alpha-SNAPSHOT",http_flavor="1.1",http_method="GET",http_route="/foo/$bar<[^/]+>",http_scheme="http",http_status_code="200",net_host_name="localhost",net_host_port="9000"} 1.0 1676078079798 http_server_duration_sum{otel_scope_name="io.opentelemetry.akka-http-10.0",otel_scope_version="1.23.0-alpha-SNAPSHOT",http_flavor="1.1",http_method="GET",http_route="/foo/$bar<[^/]+>",http_scheme="http",http_status_code="200",net_host_name="localhost",net_host_port="9000"} 12183.558843 1676078079798 http_server_duration_bucket{otel_scope_name="io.opentelemetry.akka-http-10.0",otel_scope_version="1.23.0-alpha-SNAPSHOT",http_flavor="1.1",http_method="GET",http_route="/foo/$bar<[^/]+>",http_scheme="http",http_status_code="200",net_host_name="localhost",net_host_port="9000",le="0.0"} 0.0 1676078079798 ... http_server_duration_bucket{otel_scope_name="io.opentelemetry.akka-http-10.0",otel_scope_version="1.23.0-alpha-SNAPSHOT",http_flavor="1.1",http_method="GET",http_route="/foo/$bar<[^/]+>",http_scheme="http",http_status_code="200",net_host_name="localhost",net_host_port="9000",le="+Inf"} 1.0 1676078079798 ``` Rel: open-telemetry#1415 Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 451c07b - Browse repository at this point
Copy the full SHA 451c07bView commit details -
Leave a note for
Play
auto instrumentation abouthttp.route
attri……bute Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dbc69e4 - Browse repository at this point
Copy the full SHA dbc69e4View commit details
Commits on Feb 13, 2023
-
Add a smoke test case to check whether the
http.route
attribute is ……in a server span with Play framework Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5151da5 - Browse repository at this point
Copy the full SHA 5151da5View commit details -
Fix a violation which is pointed out by
:smoke-tests:codenarcTest
Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 871ce5f - Browse repository at this point
Copy the full SHA 871ce5fView commit details -
Simplify the span updating for Play2.6 MVC
rel: - open-telemetry#7801 (comment) - open-telemetry#7801 (comment) Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ff97ca1 - Browse repository at this point
Copy the full SHA ff97ca1View commit details -
Simplify a smoke test case for Play framework
ref: https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/7801/files#r1104257504 Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5be95b8 - Browse repository at this point
Copy the full SHA 5be95b8View commit details -
Support
http.route
attribute inhttp.server.duration
on Play 2.4 MVCrel: open-telemetry#7801 (comment) Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6109ae3 - Browse repository at this point
Copy the full SHA 6109ae3View commit details -
Tidy up the method names for consistency
Signed-off-by: moznion <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d52b750 - Browse repository at this point
Copy the full SHA d52b750View commit details