mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 18:53:12 +00:00
21 lines
485 B
C#
21 lines
485 B
C#
|
|
using Api.SeaHavenIndustries.Observability;
|
||
|
|
using Sentry;
|
||
|
|
|
||
|
|
namespace Api.SeaHavenIndustries.Middleware;
|
||
|
|
|
||
|
|
public sealed class SentryRequestMetadataMiddleware
|
||
|
|
{
|
||
|
|
private readonly RequestDelegate _next;
|
||
|
|
|
||
|
|
public SentryRequestMetadataMiddleware(RequestDelegate next)
|
||
|
|
{
|
||
|
|
_next = next;
|
||
|
|
}
|
||
|
|
|
||
|
|
public async Task InvokeAsync(HttpContext context, IHub sentryHub)
|
||
|
|
{
|
||
|
|
SentryObservability.ConfigureRequest(sentryHub, context);
|
||
|
|
await _next(context);
|
||
|
|
}
|
||
|
|
}
|