otel

package module
v91.0.0-...-d39a9b4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: BSD-3-Clause Imports: 10 Imported by: ? modules, 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

Overview

Package otel provides OpenTelemetry instrumentation for the go-github client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Transport)

Option applies configuration to Transport.

func WithMeterProvider

func WithMeterProvider(mp metric.MeterProvider) Option

WithMeterProvider configures the MeterProvider.

func WithTracerProvider

func WithTracerProvider(tp trace.TracerProvider) Option

WithTracerProvider configures the TracerProvider.

type Transport

type Transport struct {
	Base   http.RoundTripper
	Tracer trace.Tracer
	Meter  metric.Meter
}

Transport is an http.RoundTripper that instrument requests with OpenTelemetry.

func NewTransport

func NewTransport(base http.RoundTripper, opts ...Option) *Transport

NewTransport creates a new OpenTelemetry transport.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper.

Jump to

Keyboard shortcuts

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