feat: add rbac tracing (#4093)

This commit is contained in:
Colin Adler
2022-09-16 13:32:15 -05:00
committed by GitHub
parent 1bca269b90
commit b340634aaa
14 changed files with 79 additions and 34 deletions

View File

@ -199,7 +199,7 @@ func New(options *Options) *API {
apps := func(r chi.Router) {
r.Use(
httpmw.RateLimitPerMinute(options.APIRateLimit),
tracing.HTTPMW(api.TracerProvider, "coderd.http"),
tracing.HTTPMW(api.TracerProvider),
httpmw.ExtractAPIKey(options.Database, oauthConfigs, true),
httpmw.ExtractUserParam(api.Database),
// Extracts the <workspace.agent> from the url
@ -229,7 +229,7 @@ func New(options *Options) *API {
r.Use(
// Specific routes can specify smaller limits.
httpmw.RateLimitPerMinute(options.APIRateLimit),
tracing.HTTPMW(api.TracerProvider, "coderd.http"),
tracing.HTTPMW(api.TracerProvider),
)
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
httpapi.Write(w, http.StatusOK, codersdk.Response{