Skip to content

Commit 665605b

Browse files
authored
feat: trace WebHooks (#2911)
Previously the context was not propagated to the http client. As a result the (instrumented) client did not find the existing span and the sapns for outgoing http request have been orphains. With this simple Fix they are now children of the corresponding webhook spans.
1 parent d1b4e17 commit 665605b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

selfservice/hook/web_hook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func (e *WebHook) execute(ctx context.Context, data *templateContext) error {
262262
go func() {
263263
defer close(errChan)
264264

265-
resp, err := e.deps.HTTPClient(ctx).Do(req)
265+
resp, err := e.deps.HTTPClient(ctx).Do(req.WithContext(ctx))
266266
if err != nil {
267267
errChan <- errors.WithStack(err)
268268
return

0 commit comments

Comments
 (0)