Documentation ¶
Index ¶
Constants ¶
View Source
const ( Http = "http" Https = "https" HttpMethod = "http.request.method" HttpPath = "http.request.path" HttpRemoteAddr = "http.request.remoteAddr" HttpRequestHost = "http.request.host" HttpStatus = "http.response.status" HttpLatency = "http.response.latency" TLSVersion = "http.tls.version" HttpScheme = "http.scheme" )
View Source
const ( UserAgentOS = "http.user_agent.os" UserAgentOSVersion = "http.user_agent.os_version" UserAgentDevice = "http.user_agent.device" UserAgentBrowser = "http.user_agent.browser" UserAgentBrowserVersion = "http.user_agent.browser_version" BrowserChrome = "chrome" BrowserSafari = "safari" BrowserFirefox = "firefox" BrowserOpera = "opera" BrowserIE = "ie" BrowserEdge = "edge" BrowserTrident = "Trident" DeviceMobile = "mobile" DeviceDesktop = "desktop" DeviceBot = "bot" )
Variables ¶
This section is empty.
Functions ¶
func ParseHeaders ¶
ParseHeaders parses the headers and returns a map of attribs.
func ParseUserAgent ¶
ParseUserAgent parses the user agent string and returns a map of attribs.
func SpanStatus ¶
SpanStatus returns the OpenTelemetry status code as defined in go.opentelemetry.io/old_elemetry/codes and a brief description for a given HTTP status code.
func Telemetry ¶
func Telemetry(attribs attributes.Attributes) gonic.HandlerFunc
Telemetry returns middleware that will instrument and trace incoming requests.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.