Open arielvalentin opened 4 months ago
+1 for ActionDispatch::Request#route_uri_pattern
Personally I would like to keep the existing naming convention as config opt if possible, it's just such a useful railism and Action Pack is rails instrumentation, just saying 😄
... I would like to keep the existing naming convention ... it's just such a useful railism
I've heard similar from other Rails folks instrumenting with OTel. The Rails world currently thinks in the names Rails has given and not so much thinking in the OTel semantics. Maybe that will change as more people adopt OTel and polyglot shops start wondering why their Rails web request handling spans are named differently than the spans from other services in their larger system.
Shouldn't >= 7.1 be #{request.method} #{request.route_uri_pattern}
instead?
Shouldn't >= 7.1 be
#{request.method} #{request.route_uri_pattern}
instead?
@karmingc yes!
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep
label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.
action_pack
currently overrides theserver
span name to a value that does not align with semantic conventions. Per the specification^1In this case the span name is set to RubyDoc naming style, with the class name of the controller followed by an
#
then the action:https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/10e766e13e7734f284807af4099e0858ca85cf4f/instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/handlers/action_controller.rb#L29
I propose the span name be set to either of the following values:
>= 7.1
ActionDispatch::Request#route_uri_pattern
< 7.1
#{method} /#{underscore(controller)}/#{action}