Documentation: adding context
Closed this issue · 1 comments
DanielHeath commented
The documentation at https://docs.honeycomb.io/getting-data-in/ruby/beeline/#adding-context-to-events shows how to add context to a sinatra app.
To add it to a rails app, you need to change:
request.env
instead ofenv
Rack::Honeycomb.add_field
to a method that exists (this missing method is also referenced in the upgrade guide). Actually, if someone could let me know what that method is, that'd be super handy.
martin308 commented
@DanielHeath this is now much easier in v1.0.0
!
Honeycomb.start_span(name: "slow_operation") do |span|
span.add_field("interesting_thing", "banana")
end