Skip to content

extra_context ignored in rack / grape app #777

@travisp

Description

@travisp

We're using Grape API (https://github.com/ruby-grape/grape) inside of Rails and setup sentry for our apps. We followed the setup here: https://github.com/getsentry/raven-ruby/issues/373

In a grape before block we have,

    before do
      Raven.extra_context(
        params: params.to_hash,
        url: request.url,
        declared_client: request.headers['User-Agent']
      )
    end

However when we capture_exception in grape for errors that occur (we do this because we gracefully handle many exceptions), this extra context never gets passed to Sentry. I'm unsure if this is a bug in Sentry, or a problem with what we're doing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions