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.

Tracking Environment configuration change

See original GitHub issue

We have this code to read configuration from Environment variables. Is there a way I can track any change in environment variable?

public static IHostBuilder UseHostAppConfiguration(this IHostBuilder hostBuilder)
        {
            hostBuilder.ConfigureHostConfiguration(configHost =>
            {
        	  string basePath = AppContext.BaseDirectory;
                configHost.SetBasePath(basePath);
                configHost.AddJsonFile("hostsettings.json", optional: true);
                configHost.AddEnvironmentVariables();

                // add multiple environments support to generic host from asp.net core
                configHost.AddEnvironmentVariables(prefix: "ASPNETCORE_");
            });
  }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jlestercastrocommented, Feb 19, 2020
0reactions
analogrelaycommented, May 7, 2020

AFAIK there isn’t a way to monitor for environment variables changes (other than polling).

This is correct. In general Environment Variables aren’t considered something that’s likely to change (they can’t be changed from outside the process for example).

Closing as this isn’t something we intend to add.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Effectively tracking changes to configuration from dev to prod
First, you should provide a well, high quality documentation of all the entries in your configuration files, as well as some easily accessible ......
Read more >
Configuration and Change Tracking
Change tracking and controlled change ensure that there is a record of the state of a system and if issues arise the cause...
Read more >
Tracking Configuration File Changes
You can track the change history of configuration files for both personalization and user environment settings by activating Configuration ...
Read more >
How to Track Changes in Your Cloud Environment ...
To see when your environment settings have changed, open the Versions tab while viewing your diagrams. The version tab will list the current...
Read more >
Modify tracking changes in configuration files
Modify tracking changes in configuration files · Navigate to All > Pattern Designer > Discovery Patterns. · Click the pattern for the relevant...
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