internal

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifest

type Manifest struct {
	SamplingTargetsPollingInterval time.Duration
	// contains filtered or unexported fields
}

Manifest represents a full sampling ruleset and provides options for configuring Logger, Clock and xrayClient.

func NewManifest

func NewManifest(addr url.URL, samplingTargetsPollingInterval time.Duration, name *string) (*Manifest, error)

NewManifest return manifest object configured the passed with logging and an xrayClient configured to address addr.

func (*Manifest) RefreshManifestTargets

func (m *Manifest) RefreshManifestTargets(ctx context.Context) (target *SamplingTargetsOutput, err error)

RefreshManifestTargets updates sampling targets (statistics) for each rule.

type SamplingTargetsOutput

type SamplingTargetsOutput struct {
	// The percentage of matching requests to instrument, after the reservoir is
	// exhausted.
	FixedRate float64 `json:"FixedRate,omitempty"`

	// The number of seconds for the service to wait before getting sampling targets
	// again.
	Interval int64 `json:"Interval,omitempty"`

	// The number of requests per second that X-Ray allocated this service.
	ReservoirQuota float64 `json:"ReservoirQuota,omitempty"`
}

SamplingTargetsOutput is used to store parsed json sampling targets.

Jump to

Keyboard shortcuts

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