Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 Changes recommended
The DI registration change for externally provided ExceptionlessClient may alter disposal/ownership semantics in a potentially breaking way and should be clarified/adjusted before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces first-class “deployment environment” support in the Exceptionless .NET client so events can be tagged (and deduplicated) by environment while keeping existing runtime/environment diagnostics separate.
Changes:
- Add
ExceptionlessConfiguration.Environment(default) andEvent.Environment(per-event override) with consistent normalization/validation. - Add fluent helpers (
SetEnvironment(...)) and support reading the environment fromIConfigurationand environment variables. - Update hosting integration to fall back to
IHostEnvironment.EnvironmentName, and extend tests to cover serialization, defaults, hosting, and duplicate detection behavior.
File summaries
| File | Description |
|---|---|
| test/Exceptionless.Tests/Serializer/Models/EventSerializerTests.cs | Adds JSON round-trip coverage ensuring top-level environment is distinct from data.@environment. |
| test/Exceptionless.Tests/Plugins/910_DuplicateCheckerPluginTests.cs | Verifies duplicate detection behavior is scoped to environment. |
| test/Exceptionless.Tests/Plugins/015_ConfigurationDefaultsPluginTests.cs | Ensures default environment applies only when the event doesn’t override it. |
| test/Exceptionless.Tests/Platforms/HostingExtensionsTests.cs | Validates hosting fallback to IHostEnvironment.EnvironmentName when not explicitly configured. |
| test/Exceptionless.TestHarness/Serializer/StorageSerializerTestBase.cs | Includes environment in harness event creation for storage serialization coverage. |
| src/Platforms/Exceptionless.Extensions.Hosting/ExceptionlessExtensions.cs | Applies hosting fallback for environment during DI registration/resolution. |
| src/Exceptionless/Utility/DeploymentEnvironment.cs | Introduces centralized environment normalization/validation logic. |
| src/Exceptionless/Plugins/Default/015_ConfigurationDefaultsPlugin.cs | Applies default configuration environment to events when unspecified. |
| src/Exceptionless/Models/Client/Event.cs | Adds Event.Environment, includes it in equality/hash, and serializes it as top-level environment. |
| src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs | Adds configuration helper and reads environment from config/env vars. |
| src/Exceptionless/Extensions/EventBuilderExtensions.cs | Adds EventBuilder.SetEnvironment(...) for per-event overrides. |
| src/Exceptionless/Configuration/ExceptionlessConfiguration.cs | Adds ExceptionlessConfiguration.Environment with normalization/validation. |
| README.md | Documents environment configuration, overrides, normalization rules, and separation from runtime metadata. |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f4f13670b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ac945eb94
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f875dcdd6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fca9d0e0b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb3f2150ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e984cd781
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ents # Conflicts: # build/common.props
Cover reading Exceptionless:Environment from IConfiguration and both DI factory overloads, and document that a configured empty value stays unspecified and that Startup re-reads environment variables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Startup re-reads environment variables (and, on .NET Framework, the configuration file), which replaced an environment set in code. Configuration sources now apply only when code has not set one, and later sources still replace earlier ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Names are trimmed, then must match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$.
Anything else is unspecified and never rewritten.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New clients fall back to ASPNETCORE_ENVIRONMENT, DOTNET_ENVIRONMENT, then AZURE_FUNCTIONS_ENVIRONMENT at the lowest precedence. The lifetime service and ASP.NET Core UseExceptionless now apply IHostEnvironment, covering IHostBuilder.UseExceptionless and services.AddExceptionless(client). SetDefaultEnvironment(null) no longer clears a detected value.
Adds ExceptionlessAttribute.Environment, an NLog target Environment layout, and an Environment setting on both log4net appenders. Tests cover the full precedence chain, detection order and the Exceptionless__Environment variable.
The server matches environments case-insensitively, so the client duplicate checker now does too.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64fecd4852
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Adds a first-class deployment environment (the root
environmentfield) to every event. The server uses it for environment filtering, per-environment notifications and the project allow-list (Exceptionless #2570, #2711).API
Precedence (the first match wins)
EventBuilder.SetEnvironmentConfiguration.Environment/SetEnvironment, including theAddExceptionless(c => …)callbackExceptionless:Environment(IConfiguration or app setting),Exceptionless__Environment,[assembly: Exceptionless(Environment = …)],<exceptionless environment="…">IHostEnvironment.EnvironmentNameASPNETCORE_ENVIRONMENT, thenDOTNET_ENVIRONMENT, thenAZURE_FUNCTIONS_ENVIRONMENTIntegrations
AddExceptionlessoverload,UseExceptionless()(both builders andIApplicationBuilder) andExceptionlessLifetimeServiceEnvironmentlayout, e.g.${environment:DOTNET_ENVIRONMENT}<environment>on both appendersBehavior
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. Casing is kept. An invalid or empty configured value leaves the event unspecified; it does not fall back.data.@environment(machine diagnostics) is unchanged.Notes
environmentas custom data.Production..agentsskill references, and the AspNetCore, Console and Web samples.IHostBuilder, lifetime-service andIApplicationBuilderpaths, NLog and log4net settings, casing in duplicate checking, plus the existing configuration, plugin and serializer coverage.