Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

Resolves getsentry/sentry-unity#2248

Super minor but I had an issue open on the Unity SDK about it: We don't need to warn about setting up debug logging in production twice, right? Only once when actually setting the logger should suffice?

Sentry: (Warning) Sentry option 'Debug' is set to true while Environment is production. Be aware this can cause performance degradation and is not advised. See https://docs.sentry.io/platforms/dotnet/configuration/diagnostic-logger for more information 
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
Sentry.Unity.UnityLogger:Log(SentryLevel, String, Exception, Object[])
Sentry.SentrySdk:InitHub(SentryOptions)
Sentry.SentrySdk:Init(SentryOptions)
Sentry.Unity.SentryUnitySdk:Init(SentryUnityOptions)
Sentry.Unity.SentrySdk:Init(SentryUnityOptions)

Sentry: (Debug) DSN read from options: https://huehue@hue.ingest.us.sentry.io/huehuehue 
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
Sentry.Unity.UnityLogger:Log(SentryLevel, String, Exception, Object[])
Sentry.Internal.SettingLocator:GetDsn()
Sentry.SentrySdk:InitHub(SentryOptions)
Sentry.SentrySdk:Init(SentryOptions)
Sentry.Unity.SentryUnitySdk:Init(SentryUnityOptions)
Sentry.Unity.SentrySdk:Init(SentryUnityOptions)

Sentry: (Debug) Initializing Hub for Dsn: 'https://huehue@hue.ingest.us.sentry.io/huehuehue'. 
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
Sentry.Unity.UnityLogger:Log(SentryLevel, String, Exception, Object[])
Sentry.Internal.Hub:.ctor(SentryOptions, ISentryClient, ISessionManager, ISystemClock, IInternalScopeManager, RandomValuesFactory, IReplaySession, ISampleRandHelper, BackpressureMonitor)
Sentry.SentrySdk:InitHub(SentryOptions)
Sentry.SentrySdk:Init(SentryOptions)
Sentry.Unity.SentryUnitySdk:Init(SentryUnityOptions)
Sentry.Unity.SentrySdk:Init(SentryUnityOptions)

Sentry: (Warning) Sentry option 'Debug' is set to true while Environment is production. Be aware this can cause performance degradation and is not advised. See https://docs.sentry.io/platforms/dotnet/configuration/diagnostic-logger for more information 
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
Sentry.Unity.UnityLogger:Log(SentryLevel, String, Exception, Object[])
Sentry.SentryClient:.ctor(SentryOptions, IBackgroundWorker, RandomValuesFactory, ISessionManager, BackpressureMonitor)
Sentry.Internal.Hub:.ctor(SentryOptions, ISentryClient, ISessionManager, ISystemClock, IInternalScopeManager, RandomValuesFactory, IReplaySession, ISampleRandHelper, BackpressureMonitor)
Sentry.SentrySdk:InitHub(SentryOptions)
Sentry.SentrySdk:Init(SentryOptions)
Sentry.Unity.SentryUnitySdk:Init(SentryUnityOptions)
Sentry.Unity.SentrySdk:Init(SentryUnityOptions)

#skip-changelog

@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.36%. Comparing base (9895de7) to head (17ceb74).
⚠️ Report is 64 commits behind head on main.

Files with missing lines Patch % Lines
src/Sentry/SentryOptions.cs 53.84% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4706      +/-   ##
==========================================
- Coverage   73.50%   73.36%   -0.14%     
==========================================
  Files         483      482       -1     
  Lines       17692    17574     -118     
  Branches     3492     3475      -17     
==========================================
- Hits        13005    12894     -111     
- Misses       3796     3827      +31     
+ Partials      891      853      -38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from version6 to main November 14, 2025 02:30
Copy link
Collaborator

@jamescrosswell jamescrosswell left a comment

Choose a reason for hiding this comment

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

Thanks @bitsandfoxes

@jamescrosswell jamescrosswell merged commit dadd070 into main Nov 17, 2025
31 checks passed
@jamescrosswell jamescrosswell deleted the chore/check-logging branch November 17, 2025 06:43
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.

Logging is getting set up twice

4 participants