-
Notifications
You must be signed in to change notification settings - Fork 5
Add better telemetry and make preparations for monorepo #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…atChannel thread-safe
c7e051b to
dbd08d1
Compare
03ca379 to
913cb87
Compare
| 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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| var httpContextAccessor = _serviceProvider.GetService<IHttpContextAccessor>(); | ||
|
|
||
| return httpContextAccessor?.HttpContext != null | ||
| ? new RequestScopeWrapper(httpContextAccessor.HttpContext.RequestServices) | ||
| : _serviceProvider.CreateScope(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge improvement actually, pretty proud of this one.
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: