Skip to content

feat: Environment variable naming consistency #2812

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

Merged
merged 27 commits into from
Oct 10, 2024

Conversation

tippmar-nr
Copy link
Member

@tippmar-nr tippmar-nr commented Oct 7, 2024

Description

Unifies all environment variable names used by the .NET agent so that they start with NEW_RELIC_ everywhere.

The variable names that changed are as follows:

Old Name New Name
CORECLR_NEWRELIC_HOME CORECLR_NEW_RELIC_HOME
NEWRELIC_FORCE_PROFILING NEW_RELIC_FORCE_PROFILING
NEWRELIC_HOME NEW_RELIC_HOME
NEWRELIC_INSTALL_PATH NEW_RELIC_INSTALL_PATH
NEWRELIC_LICENSEKEY NEW_RELIC_LICENSE_KEY
NEWRELIC_LOG_DIRECTORY NEW_RELIC_LOG_DIRECTORY
NEWRELIC_LOG_LEVEL NEW_RELIC_LOG_LEVEL
NEWRELIC_PROFILER_LOG_DIRECTORY NEW_RELIC_PROFILER_LOG_DIRECTORY
NEWRELIC_AGENT_VERSION_OVERRIDE NEW_RELIC_AGENT_VERSION_OVERRIDE

Notice (Future breaking change):

The variables in the Old Name column above are still supported with this change, but may be removed in a future major version release of the .NET agent. Users are encouraged to update their installation to use the new names as soon as possible.

Resolves #718

@tippmar-nr tippmar-nr changed the title feat: Environment variable naming consistency DRAFT: feat: Environment variable naming consistency Oct 7, 2024
github-actions bot and others added 7 commits October 7, 2024 12:28
chore: Update Profiler NuGet Package Reference to v10.31.0.12.

Co-authored-by: tippmar-nr <120425148+tippmar-nr@users.noreply.github.com>
chore: Update Profiler NuGet Package Reference to v10.31.0.19.

Co-authored-by: tippmar-nr <120425148+tippmar-nr@users.noreply.github.com>
@tippmar-nr tippmar-nr changed the title DRAFT: feat: Environment variable naming consistency feat: Environment variable naming consistency Oct 9, 2024
@tippmar-nr tippmar-nr marked this pull request as ready for review October 9, 2024 21:45
@tippmar-nr tippmar-nr requested a review from a team as a code owner October 9, 2024 21:45
@chynesNR
Copy link
Member

chynesNR commented Oct 9, 2024

When it's time to merge, remember that Notices have to use the notice: prefix in order for Release Please to pick it up. We don't currently have a section for something like "Future Breaking Changes", though we could certainly add one.

chynesNR
chynesNR previously approved these changes Oct 9, 2024
chore: Update Profiler NuGet Package Reference to v10.31.0.36.

Co-authored-by: tippmar-nr <120425148+tippmar-nr@users.noreply.github.com>
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 79.16667% with 10 lines in your changes missing coverage. Please review.

Project coverage is 81.32%. Comparing base (9669641) to head (7fa62f0).

Files with missing lines Patch % Lines
...c/Agent/Core/Configuration/DefaultConfiguration.cs 25.00% 0 Missing and 6 partials ⚠️
.../NewRelic/Agent/Core/Config/ConfigurationLoader.cs 50.00% 0 Missing and 2 partials ⚠️
...ewRelic/Agent/Core/SharedInterfaces/Environment.cs 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2812      +/-   ##
==========================================
+ Coverage   81.22%   81.32%   +0.10%     
==========================================
  Files         460      460              
  Lines       29225    29239      +14     
  Branches     3223     3231       +8     
==========================================
+ Hits        23737    23779      +42     
+ Misses       4701     4668      -33     
- Partials      787      792       +5     
Flag Coverage Δ
Agent 82.23% <65.51%> (-0.02%) ⬇️
Profiler 73.33% <100.00%> (+1.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...t/NewRelic/Agent/Core/AgentInstallConfiguration.cs 65.68% <100.00%> (+1.40%) ⬆️
...wRelic/Agent/Core/Config/BootstrapConfiguration.cs 100.00% <100.00%> (ø)
...lic/Agent/Core/SharedInterfaces/EnvironmentMock.cs 29.41% <100.00%> (-6.31%) ⬇️
...NewRelic/Profiler/Logging/DefaultFileLogLocation.h 94.59% <ø> (ø)
...nt/NewRelic/Profiler/MethodRewriter/ISystemCalls.h 100.00% <100.00%> (+53.44%) ⬆️
.../NewRelic/Agent/Core/Config/ConfigurationLoader.cs 81.53% <50.00%> (-0.42%) ⬇️
...ewRelic/Agent/Core/SharedInterfaces/Environment.cs 31.25% <66.66%> (+8.17%) ⬆️
...c/Agent/Core/Configuration/DefaultConfiguration.cs 89.56% <25.00%> (-0.34%) ⬇️

... and 2 files with indirect coverage changes

@tippmar-nr tippmar-nr enabled auto-merge (squash) October 10, 2024 18:30
@tippmar-nr tippmar-nr disabled auto-merge October 10, 2024 18:30
@tippmar-nr tippmar-nr enabled auto-merge (squash) October 10, 2024 18:41
@tippmar-nr tippmar-nr merged commit b00edda into main Oct 10, 2024
101 checks passed
@tippmar-nr tippmar-nr deleted the feature/environment-variable-naming-consistency branch October 10, 2024 19:31
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.

Consistent naming of agent environment variables that start with "NEW_RELIC" (or "NEWRELIC")
3 participants