question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating global metadata after starting application

See original GitHub issue

Hi guys,

I want to update the metadata of the global handler in a later stage. When a user uses the application, afterwards it can choose some options and Angular knows more information like userdata, settings and permissions; I want to add it like this in my app.component:

var bugsnagClient = bugsnag(<IConfig>{
            apiKey: BUGSNAG_KEY,
          })
      
          bugsnagClient.metaData = {
            settings: settings,
            userData: this.auth.userData
          }

But this will only bind the metadata to any following .notify() functions I call myself. Is there any way to bind this new metadata to the global errorhandler:

// configure Bugsnag ASAP, before any other imports
const bugsnagClient = bugsnag(BUGSNAG_KEY);

// create a factory which will return the bugsnag error handler
export function BugsnagErrorHandler() {
  return new errorHandlerFactory(bugsnagClient);
}

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bengourleycommented, Apr 29, 2019

Adding metaData should have the effect you desire (provided the error happens after the bugsnagClient.metaData = … assignment).

Feel free to contact support@bugsnag.com for further assistance using the notifier. Thanks!

0reactions
Olgagrcommented, Feb 7, 2020

@mattdyoung Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding global metadata | Snapcraft documentation
Global metadata attributes are used within snapcraft.yaml to identify the snap locally, and after publishing to the Snap Store, to identify your snap...
Read more >
Update metadata on an item - Box Developer Documentation
Updating the metadata applied to a file or folder can be done by using the item's id , the template's templateKey and scope...
Read more >
Upgrade OpenMetadata
OpenMetadata community will be doing feature releases and stable releases. Feature releases are to upgrade your sandbox or POCs to give feedback to...
Read more >
Updating Your Metadata After Publication - YouTube
You've created your metadata. You've sent it to your publishing partners. The book is published, and now you need to update something.
Read more >
How Often Should You Update Your App Store Metadata?
Now, the first week of your launch is crucial in adjusting your metadata. You need to take note of what works well and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found