otel

package module
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Overview

Package otel provides utilities for the otel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayUsage

type GatewayUsage struct {
	// contains filtered or unexported fields
}

GatewayUsage wraps the attributes.GatewayUsage type to provide gateway usage functionality.

GetHostFromAttributesHandler() handles an important nil check distinction: A nil *attributes.GatewayUsage and a nil attributes.HostFromAttributesHandler interface are different types, even though both are nil. An interface contains both type information and a value, so a nil interface is not equal to a nil concrete type pointer.

This wrapper ensures proper nil handling when converting between the concrete *attributes.GatewayUsage type and the attributes.HostFromAttributesHandler interface to avoid nil pointer panics.

func NewDisabledGatewayUsage

func NewDisabledGatewayUsage() GatewayUsage

NewDisabledGatewayUsage creates and returns a new GatewayUsage instance with no underlying gateway usage

func NewGatewayUsage

func NewGatewayUsage() GatewayUsage

NewGatewayUsage creates and returns a new GatewayUsage instance with an initialized underlying gateway usage

func (*GatewayUsage) Gauge

func (g *GatewayUsage) Gauge() (float64, bool)

Gauge returns the current gateway usage gauge value and a boolean indicating if gateway usage is enabled.

func (GatewayUsage) GetHostFromAttributesHandler

func (g GatewayUsage) GetHostFromAttributesHandler() attributes.HostFromAttributesHandler

GetHostFromAttributesHandler returns a handler for extracting host information from attributes.

Jump to

Keyboard shortcuts

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