tracing

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TagCacheCacheable = "cache.cacheable"

TagCacheCacheable - Is Resource Cacheable?

View Source
const TagCacheCached = "cache.cached"

TagCacheCached - Was the Response Cached?

View Source
const TagCacheForcedFresh = "cache.forced_fresh"

TagCacheForcedFresh - Bypass Cached Content (requested by user)

View Source
const TagCacheStale = "cache.stale"

TagCacheStale - Was the Cached Response Stale?

View Source
const TagProxyEndpoint = "proxy.endpoint"

TagProxyEndpoint - Upstream URL

View Source
const TagPurgeStatus = "purge.status"

TagPurgeStatus - Status of PURGE on resource

View Source
const TagRequestFullUrl = "request.full_url"

TagRequestFullUrl - Full Request URL

View Source
const TagRequestHost = "request.host"

TagRequestHost - Request's Host

View Source
const TagRequestId = "request.id"

TagRequestId - Request Unique ID

View Source
const TagRequestIsLegitConfHostname = "request.is_legit.conf_hostname"

TagRequestIsLegitConfHostname - Configuration Host value

View Source
const TagRequestIsLegitConfPort = "request.is_legit.conf_port"

TagRequestIsLegitConfPort - Configuration port value

View Source
const TagRequestIsLegitHostnameMatches = "request.is_legit.hostname_matches"

TagRequestIsLegitHostnameMatches - Request is legit as request's host matches the configuration

View Source
const TagRequestIsLegitPortMatches = "request.is_legit.port_matches"

TagRequestIsLegitPortMatches - Request is legit as request's port matches the configuration

View Source
const TagRequestIsLegitRequestHostname = "request.is_legit.req_hostname"

TagRequestIsLegitRequestHostname - Request's Host value

View Source
const TagRequestIsLegitRequestPort = "request.is_legit.req_port"

TagRequestIsLegitRequestPort - Request's port value

View Source
const TagRequestMethod = "request.method"

TagRequestMethod - Request's HTTP Request Method

View Source
const TagRequestScheme = "request.scheme"

TagRequestScheme - Request's URL Scheme

View Source
const TagRequestUrl = "request.url"

TagRequestUrl - Request's URL

View Source
const TagRequestWebsocket = "request.websocket"

TagRequestWebsocket - Is Request using a WebSocket?

View Source
const TagResponseLocation = "response.location"

TagResponseLocation - HTTP 301 HTTP Location

View Source
const TagResponseMustServeOriginalResponseEtagAlreadyPresent = "response.must_serve_original_response.etag_already_present"

TagResponseMustServeOriginalResponseEtagAlreadyPresent - Should serve original response if an ETag is already set in upstream

View Source
const TagResponseMustServeOriginalResponseEtagPresent = "response.must_serve_original_response.etag_present"

TagResponseMustServeOriginalResponseEtagPresent - Upstream ETag HTTP Header value

View Source
const TagResponseMustServeOriginalResponseNoBufferedContent = "response.must_serve_original_response.no_buffered_content"

TagResponseMustServeOriginalResponseNoBufferedContent - Should serve original response if there is no content

View Source
const TagResponseMustServeOriginalResponseNoHashComputed = "response.must_serve_original_response.no_hash_computed"

TagResponseMustServeOriginalResponseNoHashComputed - Should serve original response if no ETag has been generated

View Source
const TagResponseMustServeOriginalResponseResponse204 = "response.must_serve_original_response.response_204"

TagResponseMustServeOriginalResponseResponse204 - Should serve original response if response is 204 no content

View Source
const TagResponseMustServeOriginalResponseResponseNot2xx = "response.must_serve_original_response.response_not_2xx"

TagResponseMustServeOriginalResponseResponseNot2xx - Should serve original response if response is not successful

View Source
const TagResponseMustServeOriginalResponseResponseStatusCode = "response.must_serve_original_response.response_status_code"

TagResponseMustServeOriginalResponseResponseStatusCode - Upstream HTTP Status Code

View Source
const TagResponseStatusCode = "response.status_code"

TagResponseStatusCode - Response Status Code

View Source
const TagStorageCached = "storage.cached"

TagStorageCached -

Variables

This section is empty.

Functions

func AddBoolTag

func AddBoolTag(span trace.Span, key string, value bool)

AddBoolTag - Add a boolean tag to a tracing span.

func AddErrorToSpan

func AddErrorToSpan(tracingSpan trace.Span, err error)

AddErrorToSpan adds a new error event to the tracing span.

func AddEventsToSpan

func AddEventsToSpan(tracingSpan trace.Span, name string, events map[string]string)

AddEventsToSpan adds new events to the tracing span.

func Fail

func Fail(tracingSpan trace.Span, msg string)

Fail flags the tracing span as failed, and adds an error label.

func HTTPHandlerFunc

func HTTPHandlerFunc(handler http.HandlerFunc, operation string) http.HandlerFunc

HTTPHandlerFunc - Add OpenTelemetry data to a HTTP handler.

func Inject

func Inject(ctx context.Context, request *http.Request)

Inject into the outbound HTTP Request the tracing span's context.

func NewChildSpan

func NewChildSpan(ctx context.Context, operation string) trace.Span

NewChildSpan returns a new tracing child span from the global tracer. Each tracing span must be followed by `defer tracingSpan.End()`.

func NewJaegerProvider

func NewJaegerProvider(appVersion string, jaegerEndpoint string, sampleRatio float64) (*tracesdk.TracerProvider, error)

NewJaegerProvider returns a new instance of Jaeger.

func NewSpan

func NewSpan(ctx context.Context, operation string) (trace.Span, context.Context)

NewSpan returns a new tracing span from the global tracer. Each tracing span must be followed by `defer tracingSpan.End()`.

func SetErrorAndFail

func SetErrorAndFail(span trace.Span, err error, msg string)

SetErrorAndFail - Add an error and a custom failure message to a tracing span.

func SpanFromContext

func SpanFromContext(ctx context.Context) trace.Span

SpanFromContext returns the current tracing span from a context.

func StartSpanFromRequest

func StartSpanFromRequest(operation string, r *http.Request) (trace.Span, context.Context)

StartSpanFromRequest retrieves a tracing span from the inbound HTTP request. The tracing can be continued with a child span (if any) so there will be continuity in the tracing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL