From ff58c319c0901589ac9f454516a9574ec5abf044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=A9dney=20Yuri=20Lima?= Date: Wed, 25 Aug 2021 00:43:41 -0300 Subject: [PATCH] create tracing segments for http response write --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 2fb2d94..e28469c 100644 --- a/main.go +++ b/main.go @@ -83,6 +83,8 @@ func (n *NewRelicPlugin) AfterTransaction(ctx context.Context, tr restql.Transac return ctx } + segment := txn.StartSegment("Flush") + defer segment.End() //todo: set headers w.WriteHeader(tr.Status) _, err = w.Write(tr.Body)