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.

Add ability to update config after start()

See original GitHub issue

Description

Some config values, such as codeBundleId should be able to be modified at runtime.

Describe the solution you’d like

const localPackage = await CodePush.getUpdateMetadata()
if (localPackage) {
  Bugsnag.updateConfig({
	codeBundleId: localPackage.label
  })
}

See the CodePush docs for more examples

Describe alternatives you’ve considered Hardcoding the codepush version, but that’s error-prone. I would rather just get it dynamically from the source.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mattdyoungcommented, May 19, 2021

Hi @swrobel

It’s also worth noting that the codeBundleId is just intended to be a unique version identifier which you change each time you update your JS bundle. It doesn’t need to map to the CodePush label.

We don’t intend to change the interface to make the codeBundleId config modifiable after initialization for the reasons Xander mentioned around the risk of errors being reported before it is set.

If you really wanted to set it dynamically after initialization this can be overridden as event.app.codeBundleId in an onError callback on Android and iOS: https://docs.bugsnag.com/platforms/android/customizing-error-reports/#app https://docs.bugsnag.com/platforms/ios/customizing-error-reports/#app

Thanks!

0reactions
mattdyoungcommented, May 21, 2021

@swrobel - thanks for mentioning that regarding the Algolia search. I’ll feed that back to the team and see if there’s a way for us to improve the search results.

Read more comments on GitHub >

github_iconTop Results From Across the Web

About client settings in Configuration Manager - Microsoft Learn
Learn about the default and custom settings for controlling client behaviors.
Read more >
Spring Cloud Config Refresh Strategies - Soshace
In the case of using Spring Cloud Config Server; Spring Cloud offers the following methods to refresh the properties in config clients.
Read more >
Getting Started | Centralized Configuration - Spring
Add a simple property and value ( message = Hello world ) to the newly created a-bootiful-client.properties file and then git commit the...
Read more >
How AWS Config Works
AWS Config tracks changes in the configuration of your AWS resources, and it regularly sends updated configuration details to an Amazon S3 bucket...
Read more >
How do I access Configuration in any class in ASP.NET Core?
Update. Using ASP.NET Core 2.0 will automatically add the IConfiguration instance of your application in the dependency injection container.
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