
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ember-cli-bugsnag
Advanced tools
Install the addon:
ember install ember-cli-bugsnag
There are two ways to configure ember-cli-bugsnag
:
config/environment
:{
bugsnag: {
apiKey: '',
notifyReleaseStages: ['development', 'production']
}
}
The releaseStage defaults to the current application environment, if you
need to set a different releaseStage that diverges from the environment, you
can pass and additional attribute to the bugsnag configuration called
releaseStage
. It would look like this:
{
bugsnag: {
apiKey: '',
notifyReleaseStages: ['development', 'production', 'staging'],
releaseStage: 'staging'
}
}
export BUGSNAG_API_KEY=''
export BUGSNAG_NOTIFY_RELEASE='development,production'
Configuration options:
config.bugsnag.apiKey
/ BUGSNAG_API_KEY
-- requiredconfig.bugsnag.notifyReleaseStages
/ BUGSNAG_NOTIFY_RELEASE
-- optional, defaults to []
(never notify).config.bugsnag.releaseStage
/ BUGSNAG_RELEASE_STAGE
-- optional, defaults to config.environment
.config.bugsnag.endpoint
/ BUGSNAG_ENDPOINT
-- optional, defaults to what the libraryUrl uses.config.currentRevision
-- any string representing the current version of the app, e.g. "1b8ef2c7"
or "v1.2.4"
, optional.
0.1.0
.In order to send additional data along with errors reported to Bugsnag, generate
a utility named bugsnag
:
ember g util bugsnag
To send custom meta data, define a helper method getMetaData
in the
app/utils/bugsnag.js
you created. getMetaData
takes the error and the
container as arguments, e.g.:
export function getMetaData(error, container) {
return {
// …some meta data
};
}
ember-cli-bugsnag
calls this method for every error and reports any data
returned by it to Bugsnag as meta data for the respective error. The returned
metaData should be formatted to correspond with tabs in your interface. E.g.
for an Account tab:
return {
account: {
name: "Bugsnag",
plan: "premium",
beta_access: true
}
};
To correlate a specific user to an error and have the information appear in the
User tab in the Bugsnag UI, send user data with each error data. Define a
helper method getUser
in the app/utils/bugsnag.js
you created. getUser
takes the container as an argument. For example, if you have a currentUser
service that references a user
model in your app:
import Ember from 'ember';
const {
getProperties
} = Ember;
export function getUser(owner) {
const currentUser = owner.lookup('service:current-user').get('user');
const {
email,
id,
fullName: name
} = getProperties(currentUser, 'email', 'id', 'fullName');
return {
email,
id,
name
};
}
Uploading sourcemaps to Bugsnag makes it easier to track down errors in your
code because the stacktrace for each error in the Bugsnag UI highlights the
exact line in your unminified source code. To send sourcemaps Bugsnag, use the
Ember CLI Deploy addon ember-cli-deploy-bugsnag
.
FAQs
Integrates Bugsnag reporting service into your Ember CLI app.
We found that ember-cli-bugsnag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.