fix: use API, not request context to insert audit/connection logs (#20829)

Fixes: #20744

Upsert audit and connection log entries with a context derived from the API context, rather than the individual request so that we don't error out if the request is canceled or the client hangs up (e.g. if we return an error).
This commit is contained in:
Spike Curtis
2025-11-20 13:01:50 +04:00
committed by GitHub
parent 48b8e22502
commit 007f2df079
2 changed files with 10 additions and 3 deletions
+1
View File
@@ -610,6 +610,7 @@ func New(options *Options) *API {
dbRolluper: options.DatabaseRolluper,
}
api.WorkspaceAppsProvider = workspaceapps.NewDBTokenProvider(
ctx,
options.Logger.Named("workspaceapps"),
options.AccessURL,
options.Authorizer,