Plugins: Add context to StaticRouteResolver and ErrorResolver interfaces (#73121)

* add ctx

* fix tests
This commit is contained in:
Will Browne
2023-08-10 10:32:12 +02:00
committed by GitHub
parent 2c57bca176
commit d29f4a8f76
11 changed files with 26 additions and 29 deletions

View File

@ -80,7 +80,7 @@ func GrafanaJavascriptAgentLogMessageHandler(store *frontendlogging.SourceMapSto
var ctx = frontendlogging.CtxVector{}
ctx = event.AddMetaToContext(ctx)
exception := exception
transformedException := frontendlogging.TransformException(&exception, store)
transformedException := frontendlogging.TransformException(c.Req.Context(), &exception, store)
ctx = append(ctx, "kind", "exception", "type", transformedException.Type, "value", transformedException.Value, "stacktrace", transformedException.String())
ctx = append(ctx, "original_timestamp", exception.Timestamp)
frontendLogger.Error(exception.Message(), ctx...)