Skip to content

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Nov 7, 2025

📜 Description

Log why a properties file was not loaded, e.g. file not found, not a file or not readable

💡 Motivation and Context

Took me a while to figure out why my properties weren't working as expected.

💚 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

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 0f3ff3c

@adinauer adinauer changed the title feat(init) Log why a properties file was not loaded feat(init): Log why a properties file was not loaded Nov 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 301.24 ms 354.94 ms 53.70 ms
Size 1.58 MiB 2.12 MiB 553.11 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ee747ae 374.71 ms 455.18 ms 80.47 ms
9fbb112 359.71 ms 421.85 ms 62.14 ms
23d6b12 354.10 ms 408.38 ms 54.28 ms
674d437 355.28 ms 504.18 ms 148.90 ms
604a261 380.65 ms 451.27 ms 70.62 ms
3d205d0 352.15 ms 432.53 ms 80.38 ms
ce0a49e 532.00 ms 609.96 ms 77.96 ms
d5a29b6 298.62 ms 391.78 ms 93.16 ms
ee747ae 358.21 ms 389.41 ms 31.20 ms
27d7cf8 306.76 ms 366.66 ms 59.90 ms

App size

Revision Plain With Sentry Diff
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
9fbb112 1.58 MiB 2.11 MiB 539.18 KiB
23d6b12 1.58 MiB 2.10 MiB 532.31 KiB
674d437 1.58 MiB 2.10 MiB 530.94 KiB
604a261 1.58 MiB 2.10 MiB 533.42 KiB
3d205d0 1.58 MiB 2.10 MiB 532.97 KiB
ce0a49e 1.58 MiB 2.10 MiB 532.94 KiB
d5a29b6 1.58 MiB 2.12 MiB 549.37 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
27d7cf8 1.58 MiB 2.12 MiB 549.42 KiB

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 👍

logger.log(
SentryLevel.ERROR,
"Failed to load Sentry configuration since it is not readable: %s",
filePath);
Copy link

Choose a reason for hiding this comment

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

Bug: Whitespace Path Mismatch

The error messages log the original filePath which may contain whitespace, but the actual file check uses filePath.trim(). This creates confusing logs where the displayed path doesn't match the path that was actually checked, making debugging difficult when paths have leading or trailing whitespace.

Fix in Cursor Fix in Web

@adinauer adinauer enabled auto-merge (squash) November 10, 2025 13:59
@adinauer adinauer merged commit dcc6bbf into main Nov 10, 2025
61 of 62 checks passed
@adinauer adinauer deleted the feat/better-logging-if-properties-file-not-loaded branch November 10, 2025 14:05
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.

5 participants