Add better telemetry and make preparations for monorepo#92
Merged
richardscull merged 29 commits intomasterfrom Jan 6, 2026
Merged
Add better telemetry and make preparations for monorepo#92richardscull merged 29 commits intomasterfrom
richardscull merged 29 commits intomasterfrom
Conversation
…atChannel thread-safe
c7e051b to
dbd08d1
Compare
03ca379 to
913cb87
Compare
richardscull
commented
Jan 6, 2026
| new ExternalApi(ApiType.CalculateScorePerformance, ApiServer.Observatory, $"http://{ObservatoryUrl}/calculator/score", 0, 0, true), | ||
| new ExternalApi(ApiType.BeatmapDownload, ApiServer.Observatory, $"http://{ObservatoryUrl}/osu/{{0}}", 0, 1), | ||
| new ExternalApi(ApiType.BeatmapSetDataById, ApiServer.Observatory, $"http://{ObservatoryUrl}/api/v2/s/{{0}}", 0, 1), | ||
| new ExternalApi(ApiType.BeatmapSetDataById, ApiServer.Observatory, $"http://{ObservatoryUrl}/api/v2/s/{{0}}?allowMissingNonBeatmapValues=true", 0, 1), |
Member
Author
There was a problem hiding this comment.
Reflect SunriseCommunity/Observatory#7
Basically, this will allow us to fallback to osu.direct if catboy.best fails (or unavailable) at getting beatmap by hash.
Comment on lines
+35
to
+39
| var httpContextAccessor = _serviceProvider.GetService<IHttpContextAccessor>(); | ||
|
|
||
| return httpContextAccessor?.HttpContext != null | ||
| ? new RequestScopeWrapper(httpContextAccessor.HttpContext.RequestServices) | ||
| : _serviceProvider.CreateScope(); |
Member
Author
There was a problem hiding this comment.
Huge improvement actually, pretty proud of this one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR introduces comprehensive telemetry and observability improvements to the Sunrise application, including OpenTelemetry tracing, enhanced logging with Serilog, and improved monitoring capabilities.
appsettings.*.jsoninto.env.env.example.appsettings.*.jsonif the.envvalue doesn't exist.Important
Please refer to Migration notes below if you are self-hosting sunrise.
Telemetry
Tracing
apiandservercontrollers.[TraceExecution]for AOP-based tracing**Logging
Metrics
Misc
ListwithConcurrentDictionaryinChatChannelfor thread-safe user ID managementServicesProviderHolderto attempt retrieving HttpContext scope before creating a new oneMicrosoft.EntityFrameworkCoreup to8.0.22.Migration notes
Due to the upcoming move to the Solar System monorepo we made almost non-compatible changes to the Sunrise. If you were using Sunrise before, please watch out for the following breaking changes:
.envfile for environment variables instead ofappsettings.json- Please refer to step 3.1 of the Standalone installation with self-signed certificate (Docker) 🐳 or Development installation ⚒️ sections for more information.Deprecated hangfire connection was using Postgres, which is no longer supportederror at the server startup, please create.envfile and setup theHANGFIRE_*variables according to your MySQL setup. View example below: