-
Notifications
You must be signed in to change notification settings - Fork 3
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
add railtie based RUM Rack instrumentation #26
Conversation
7db4c89
to
60f4a0c
Compare
I did the same exporter stuff as the rack test but it fails in rails_test. |
instead of creating a new exporter in RumRailsTest and RackRailsTest have EXPORTER instance created globally and reset it in the teardown method of the testcases. It may be useful to figure out in the future why creating a new exporter in each testcase was resulting in no spans making it to the exporter in the second test to run.
48aad37
to
53aace3
Compare
class Railtie < ::Rails::Railtie | ||
# TODO: use an explicit ordering to be after the Otel middleware | ||
# instead of just adding it to the end of the list of middlewares | ||
config.before_initialize do |app| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.before_initialize do |app|
app.middleware.insert_before(
ActionDispatch::ServerTiming,
Splunk::Otel::Rack::RumMiddleware
)
end
the order is reversed. ActionDispatch::ServerTiming
will overwrite server-timing
, so we need to append after to their values.
Added a couple of comments, I think that documentation would be good to have, even if it's very basic, e.g. without any troubleshooting tips. |
No description provided.