apisec

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sampler

type Sampler interface {
	DecisionFor(SamplingKey) bool
}

func NewProxySampler added in v1.13.0

func NewProxySampler(rate int, interval time.Duration) Sampler

NewProxySampler creates a new sampler suitable for proxy environments where the sampling decision is not based on the request's properties, but on a rate.

func NewSamplerWithInterval

func NewSamplerWithInterval(interval time.Duration) Sampler

NewSamplerWithInterval returns a new *Sampler with the specified interval.

type SamplingKey

type SamplingKey struct {
	// Method is the value of the http.method span tag
	Method string
	// Route is the value of the http.route span tag
	Route string
	// StatusCode is the value of the http.status_code span tag
	StatusCode int
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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