File: route_name_below_go1.23.go

package info (click to toggle)
golang-github-getsentry-sentry-go 0.29.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,404 kB
  • sloc: makefile: 75; sh: 21
file content (10 lines) | stat: -rw-r--r-- 252 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
//go:build !go1.23

package traceutils

import "net/http"

// GetHTTPSpanName grab needed fields from *http.Request to generate a span name for `http.server` span op.
func GetHTTPSpanName(r *http.Request) string {
	return r.Method + " " + r.URL.Path
}