Skip to content

Commit

Permalink
correct production telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
p5quared committed Feb 26, 2024
1 parent bbcd82a commit 723c133
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ func ProdMiddleware(c *http.Client) *MiddlewareRoundTripper {
c.Transport.(*oauth2.Transport),
OnBeforeRequest(sb.trackRequest),
OnAfterRequest(sb.trackError),

OnAfterRequest(displayRespError(lg)),
)

}

// NOTE: Expects that c is the result of oauth2.NewClient
Expand All @@ -148,6 +145,8 @@ func DebugMiddleware(c *http.Client) *MiddlewareRoundTripper {
sb := newSupabaseTelemetry(supabaseUrlDebug, supabaseKeyDebug)
return NewMiddleware(
c.Transport.(*oauth2.Transport),
OnBeforeRequest(displayRequest(lg)),
OnAfterRequest(displayRespError(lg)),

OnBeforeRequest(sb.trackRequest),
OnBeforeRequest(sb.trackCoursesAndAssessments),
Expand Down

0 comments on commit 723c133

Please sign in to comment.