GeezerVison is showing github.com — Add deployment environments to events by ejsmith · Pull Request #98 · exceptionless/Exceptionless.Java
Conversation
ejsmith
commented
Oct 28, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Adds deployment environments (e.g. production, staging) to events. They're sent as the root environment property, matching the .NET (#371) and JavaScript (#193) clients and the server (Exceptionless #2570).
Self-hosted: upgrade the server first. Older servers drop the property.
Usage
Exceptionless.startup(config -> config.apiKey("YOUR_API_KEY").environment("production"));
Exceptionless.createLog("Deployment complete").setEnvironment("staging").submit(); // per-event override
Which value wins
flowchart TD
A["EventBuilder.setEnvironment(name)"] -->|null| B[Value already on the event]
A -->|valid| V[Use it]
A -->|invalid| U[Send unspecified]
B -->|none| C["config.environment(...) in code"]
C -->|not set| D["exceptionless.properties → EXCEPTIONLESS_ENVIRONMENT<br/>→ system property → Spring property"]
D -->|not set| E[Spring: the single active profile]
Loading
- Strict names: trimmed, casing kept, then it must match
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. Anything else (Staging West, prod/eu, produção, empty, over 64 characters) is unspecified and never rewritten.
- A configured value that's invalid stays configured and blocks the lower levels, the same as .NET.
data.@environment (machine info) is untouched.
- The duplicate checker keeps the same error in different environments apart.
Testing
- Builds:
./mvnw verify on JDK 17, 21 and 25, plus Spring Boot 4, all green locally and in CI.
- Tests: 432 core tests plus the logging, servlet and starter modules.
- Mutation checks: each key rule was broken on purpose, and a test failed every time. The real-server end-to-end job was not run.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Events get an optional root `environment` property, separate from the
`@environment` machine data. The client configuration holds a default
(`environment(String)`, `exceptionless.environment`,
`EXCEPTIONLESS_ENVIRONMENT`), `EventBuilder.setEnvironment` overrides it
per event, and the Spring Boot starter falls back to the only active
profile. Names are normalized like the server does: trimmed, and
unspecified when empty, over 64 characters or containing control
characters.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-03T00:07:23.684695Z |
b832ea3 |
New commits |
ℹ️ 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" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
EventBuilder.setEnvironment(null) now clears any earlier override on the
builder so the configured default applies, matching the .NET and
JavaScript clients. Only a non-null value that is not valid (empty or
white space, over 64 characters, control characters) is an explicit
override that sends the event without an environment.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|