xtracer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package xtracer manages the OpenTelemetry tracer used across xhttp.

Spans are emitted under this module's import path as the instrumentation scope, so a trace shows the work as coming from the xhttp library rather than from whichever package inside the consuming service happens to call it.

Index

Constants

View Source
const (
	// PkgName is the instrumentation scope reported to OpenTelemetry.
	PkgName = "github.com/ruko1202/xhttp"
)

Variables

This section is empty.

Functions

func GetTracer

func GetTracer() trace.Tracer

GetTracer returns the tracer built from the current provider. It is safe for concurrent use.

func GetVersion

func GetVersion() string

GetVersion returns the module version recorded in the binary's build info, falling back to defaultVersion when it cannot be determined.

func SetTracerProvider

func SetTracerProvider(tp trace.TracerProvider)

SetTracerProvider sets the tracer provider used by xhttp. It is safe for concurrent use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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