Skip to content
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

Rollbar js instrumentation #382

Merged
merged 8 commits into from
Feb 10, 2016
Merged

Rollbar js instrumentation #382

merged 8 commits into from
Feb 10, 2016

Conversation

jondeandres
Copy link
Contributor

Users can now use the gem to configure the Rollbar JS notifier using the
same initializer.

The gem will inject the Rollbar JS snippet and the configuration to the
returned response.

In order to configure the Rollbar.js using the gem, users can follow the
next:

js_config = {
        accessToken: "POST_CLIENT_ITEM_ACCESS_TOKEN",
        captureUncaught: true,
        payload: {
          environment: "production"
        }
}

Rollbar.configure do |config|
  # common gem configuration
  # ...
  config.js_enabled = true
  config.js_options = js_config
end

The options passed to #js_options= are the same than the used for the
Rollbar JS notifier.

Jon de Andres added 3 commits February 9, 2016 12:05
Users can now use the gem to configure the Rollbar JS notifier using the
same initializer.

The gem will inject the Rollbar JS snippet and the configuration to the
returned response.

In order to configure the Rollbar.js using the gem, users can follo the
next:

js_config = {
        accessToken: ""POST_CLIENT_ITEM_ACCESS_TOKEN",
        captureUncaught: true,
        payload: {
          environment: "production"
        }
}

Rollbar.configure do |config|
  # common gem configuration
  config.js_enabled = true
  config.js_options = js_config
end

The options passed to `#js_options=` are the same than the used for the
Rollbar JS notifier.
It seems we don't need it anymore
@Crisfole
Copy link
Contributor

Crisfole commented Feb 9, 2016

👍 Nice!

@jondeandres jondeandres force-pushed the rollbar-js-instrumentation branch from df6b0e8 to de709b7 Compare February 10, 2016 08:12
@jondeandres jondeandres force-pushed the rollbar-js-instrumentation branch from de709b7 to ae7e2b0 Compare February 10, 2016 08:36
Jon de Andres added 2 commits February 10, 2016 11:25
jondeandres added a commit that referenced this pull request Feb 10, 2016
@jondeandres jondeandres merged commit 2c78077 into master Feb 10, 2016
@jondeandres jondeandres deleted the rollbar-js-instrumentation branch February 10, 2016 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants