otel

package module
v86.0.0-...-a5eca73 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

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