Issue
I am trying to run the Rails command bin/rails generate sentry
to set up Sentry in my Rails app. I am seeing an error stating that the file application.html.erb
does not exist. I do not use that file in my Rails app.
Applies To
- Ruby SDK users
Resolution
Apart from generating the initialization configuration for Sentry when that command is run, we also inject one line of code into the to the <head>
of your application.html.erb
file. The exact line is -
<%= Sentry.get_trace_propagation_meta.html_safe %>
This applies Sentry trace headers to your events for the purposes of Distributed Tracing. If you are not using an erb file, you can convert the syntax of that line to whichever templating engine that you use.