Skip to content

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Nov 7, 2025

📜 Description

A properties file can be specified, e.g. using the SENTRY_PROPERTIES_FILE environment variable. This path is now trimmed so whitespaces don't cause it to not be loaded.

💡 Motivation and Context

One less source of errors when configuring the SDK.

💚 How did you test it?

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 312.38 ms 357.53 ms 45.15 ms
Size 1.58 MiB 2.12 MiB 553.10 KiB

Previous results on branch: fix/trim-whitespace-on-properties-path

Startup times

Revision Plain With Sentry Diff
f7fb571 300.64 ms 366.39 ms 65.75 ms

App size

Revision Plain With Sentry Diff
f7fb571 1.58 MiB 2.12 MiB 551.81 KiB

@adinauer adinauer changed the title fix(config) Trim whitespace on properties path fix(config): Trim whitespace on properties path Nov 10, 2025
Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@adinauer adinauer merged commit 8b95cbe into feat/better-logging-if-properties-file-not-loaded Nov 10, 2025
52 of 54 checks passed
@adinauer adinauer deleted the fix/trim-whitespace-on-properties-path branch November 10, 2025 13:48
@github-actions
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Fixes

- Trim whitespace on properties path ([#4880](https://github.com/getsentry/sentry-java/pull/4880))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 474de15

adinauer added a commit that referenced this pull request Nov 10, 2025
* Log why a properties file was not loaded

* Format code

* fix(config): Trim whitespace on properties path (#4880)

* Trim whitespace on properties file path

* format

* changelog

* changelog

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
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.

3 participants