mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-25 22:42:16 -05:00
add traces to konnectd index handler
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
logw "github.com/owncloud/ocis-konnectd/pkg/log"
|
||||
"github.com/owncloud/ocis-konnectd/pkg/middleware"
|
||||
"github.com/owncloud/ocis-pkg/v2/log"
|
||||
"go.opencensus.io/trace"
|
||||
"stash.kopano.io/kc/konnect/bootstrap"
|
||||
kcconfig "stash.kopano.io/kc/konnect/config"
|
||||
"stash.kopano.io/kc/konnect/server"
|
||||
@@ -219,8 +220,12 @@ func (k Konnectd) Index() http.HandlerFunc {
|
||||
indexHTML = bytes.Replace(indexHTML, []byte("__CSP_NONCE__"), []byte(nonce), 1)
|
||||
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if k.config.Tracing.Enabled {
|
||||
_, span := trace.StartSpan(r.Context(), "/identifier/index.html")
|
||||
defer span.End()
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write(indexHTML)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user