Documentation ¶
Index ¶
- Constants
- Variables
- type CapabilitiesConfig
- type ClientUID
- type ComputationLocation
- type DeterministicSamplingConfig
- type Digest
- type DigestSt
- type DigestType
- type DigestUpdate
- type DigestUpdateOp
- type DigestValue
- type Event
- type EventUpdate
- type EventUpdateOp
- type LimiterConfig
- type Rule
- type RuleLang
- type SampleType
- type Sampler
- type SamplerConfig
- type SamplerConfigUpdate
- type SamplerConfigUpdateReset
- type SamplerDigestUID
- type SamplerEventUID
- type SamplerSamplingStats
- type SamplerStreamRuleUID
- type SamplerStreamUID
- type SamplerUID
- type SamplingConfig
- type SamplingType
- type Stream
- type StreamUpdate
- type StreamUpdateOp
Constants ¶
View Source
const (
SrlCel = iota + 1
)
Variables ¶
View Source
var ValidSampleTypes = []SampleType{UnknownSampleType, RawSampleType, StructDigestSampleType, EventSampleType}
Functions ¶
This section is empty.
Types ¶
type CapabilitiesConfig ¶
func NewCapabilitiesFromProto ¶
func NewCapabilitiesFromProto(c *protos.Capabilities) CapabilitiesConfig
func (CapabilitiesConfig) ToProto ¶
func (cc CapabilitiesConfig) ToProto() *protos.Capabilities
type ComputationLocation ¶
type ComputationLocation uint8
const ( ComputationLocationUnknown ComputationLocation = iota ComputationLocationSampler ComputationLocationCollector )
func ParseComputationLocation ¶
func ParseComputationLocation(t string) ComputationLocation
func (ComputationLocation) String ¶
func (s ComputationLocation) String() string
type Digest ¶
type Digest struct { UID SamplerDigestUID Name string StreamUID SamplerStreamUID FlushPeriod time.Duration BufferSize int ComputationLocation ComputationLocation // digest specific config Type DigestType St DigestSt Value DigestValue }
func NewDigestFromProto ¶
type DigestType ¶
type DigestType uint8
const ( DigestTypeUnknown DigestType = iota DigestTypeSt DigestTypeValue )
type DigestUpdate ¶
type DigestUpdate struct { Op DigestUpdateOp Digest Digest }
func NewDigestUpdateFromProto ¶
func NewDigestUpdateFromProto(digestUpdate *protos.ClientDigestUpdate) DigestUpdate
func (*DigestUpdate) IsValid ¶
func (du *DigestUpdate) IsValid() error
func (*DigestUpdate) ToProto ¶
func (du *DigestUpdate) ToProto() *protos.ClientDigestUpdate
type DigestUpdateOp ¶
type DigestUpdateOp int
const ( DigestUpsert DigestUpdateOp = iota + 1 DigestDelete )
type DigestValue ¶
type DigestValue struct {
MaxProcessedFields int
}
func NewDigestValueFromProto ¶
func NewDigestValueFromProto(protoDigestValue *protos.Digest_Value) DigestValue
func (*DigestValue) ToProto ¶
func (dv *DigestValue) ToProto() *protos.Digest_Value
type Event ¶
type Event struct { UID SamplerEventUID Name string StreamUID SamplerStreamUID SampleType SampleType Rule Rule Limiter LimiterConfig }
func NewEventFromProto ¶
type EventUpdate ¶
type EventUpdate struct { Op EventUpdateOp Event Event }
func NewEventUpdateFromProto ¶
func NewEventUpdateFromProto(eventUpdate *protos.ClientEventUpdate) EventUpdate
func (*EventUpdate) IsValid ¶
func (eu *EventUpdate) IsValid() error
func (*EventUpdate) ToProto ¶
func (eu *EventUpdate) ToProto() *protos.ClientEventUpdate
type EventUpdateOp ¶
type EventUpdateOp int
const ( EventUpsert EventUpdateOp = iota + 1 EventDelete )
type LimiterConfig ¶
type LimiterConfig struct {
Limit int32
}
func NewLimiterFromProto ¶
func NewLimiterFromProto(sr *protos.Limiter) LimiterConfig
func (LimiterConfig) ToProto ¶
func (sr LimiterConfig) ToProto() *protos.Limiter
type Rule ¶
func NewRuleFromProto ¶
type RuleLang ¶
type RuleLang int
func NewRuleLangFromProto ¶
func NewRuleLangFromProto(lang protos.Rule_Language) RuleLang
func (RuleLang) ToProto ¶
func (srl RuleLang) ToProto() protos.Rule_Language
type SampleType ¶
type SampleType uint8
const ( UnknownSampleType SampleType = iota RawSampleType StructDigestSampleType ValueDigestSampleType EventSampleType ConfigSampleType )
func NewSampleTypeFromProto ¶
func NewSampleTypeFromProto(sampleType protos.SampleType) SampleType
func ParseSampleType ¶
func ParseSampleType(t string) SampleType
func (SampleType) String ¶
func (s SampleType) String() string
func (SampleType) ToProto ¶
func (s SampleType) ToProto() protos.SampleType
type Sampler ¶
type Sampler struct { Name string Resource string UID SamplerUID Config SamplerConfig SamplingStats SamplerSamplingStats }
func NewSampler ¶
func NewSampler(name, resource string, uid SamplerUID) *Sampler
func NewSamplerFromProto ¶
type SamplerConfig ¶
type SamplerConfig struct { Streams map[SamplerStreamUID]Stream LimiterIn *LimiterConfig SamplingIn *SamplingConfig LimiterOut *LimiterConfig Digests map[SamplerDigestUID]Digest Events map[SamplerEventUID]Event }
Used to get and update the sampler configuration.
When sent by the server to update a sampler, only the fields that are present are updated. If a field is present, the previous value is replaced with the new one.
func NewSamplerConfig ¶
func NewSamplerConfig() *SamplerConfig
func NewSamplerConfigFromProto ¶
func NewSamplerConfigFromProto(config *protos.SamplerConfig) SamplerConfig
func (*SamplerConfig) DigestTypesByLocation ¶
func (pc *SamplerConfig) DigestTypesByLocation(location ComputationLocation) []DigestType
func (SamplerConfig) IsEmpty ¶
func (pc SamplerConfig) IsEmpty() bool
func (*SamplerConfig) Merge ¶
func (pc *SamplerConfig) Merge(update SamplerConfigUpdate)
func (SamplerConfig) ToProto ¶
func (pc SamplerConfig) ToProto() *protos.SamplerConfig
type SamplerConfigUpdate ¶
type SamplerConfigUpdate struct { // If a field is set to true, it means that the field is reset to its default. // If a configuration option is reset and set in the same request, it will be // first resetted and then set to its new value. Reset SamplerConfigUpdateReset // All fields are optional. If a field is nil, it means that the field is not updated. StreamUpdates []StreamUpdate LimiterIn *LimiterConfig SamplingIn *SamplingConfig LimiterOut *LimiterConfig DigestUpdates []DigestUpdate EventUpdates []EventUpdate }
func NewSamplerConfigUpdate ¶
func NewSamplerConfigUpdate() SamplerConfigUpdate
func NewSamplerConfigUpdateFromProto ¶
func NewSamplerConfigUpdateFromProto(protoUpdate *protos.ClientSamplerConfigUpdate) SamplerConfigUpdate
func (SamplerConfigUpdate) IsValid ¶
func (scu SamplerConfigUpdate) IsValid() error
func (SamplerConfigUpdate) ToProto ¶
func (scu SamplerConfigUpdate) ToProto() *protos.ClientSamplerConfigUpdate
type SamplerConfigUpdateReset ¶
type SamplerConfigUpdateReset struct { LimiterIn bool SamplingIn bool Streams bool LimiterOut bool Digests bool Events bool }
func NewSamplerConfigUpdateResetFromProto ¶
func NewSamplerConfigUpdateResetFromProto(protoReset *protos.ClientSamplerConfigUpdate_Reset) SamplerConfigUpdateReset
func (SamplerConfigUpdateReset) ToProto ¶
func (scr SamplerConfigUpdateReset) ToProto() *protos.ClientSamplerConfigUpdate_Reset
type SamplerDigestUID ¶
type SamplerDigestUID string
type SamplerEventUID ¶
type SamplerEventUID string
type SamplerSamplingStats ¶
type SamplerSamplingStats struct { SamplesEvaluated uint64 SamplesExported uint64 SamplesDigested uint64 }
func NewSamplerSamplingStatsFromProto ¶
func NewSamplerSamplingStatsFromProto(stats *protos.SamplerSamplingStats) SamplerSamplingStats
func (SamplerSamplingStats) ToProto ¶
func (s SamplerSamplingStats) ToProto() *protos.SamplerSamplingStats
type SamplerStreamRuleUID ¶
type SamplerStreamRuleUID string
type SamplerStreamUID ¶
type SamplerStreamUID string
type SamplerUID ¶
type SamplerUID string
type SamplingConfig ¶
type SamplingConfig struct { SamplingType SamplingType DeterministicSampling DeterministicSamplingConfig }
func NewSamplingConfigFromProto ¶
func NewSamplingConfigFromProto(sr *protos.Sampling) SamplingConfig
func (SamplingConfig) ToProto ¶
func (sc SamplingConfig) ToProto() *protos.Sampling
type SamplingType ¶
type SamplingType int
const ( UnknownSamplingType SamplingType = iota DeterministicSamplingType )
type Stream ¶
type Stream struct { UID SamplerStreamUID Name string StreamRule Rule ExportRawSamples bool }
func NewStreamFromProto ¶
type StreamUpdate ¶
type StreamUpdate struct { Op StreamUpdateOp Stream Stream }
func NewStreamUpdateFromProto ¶
func NewStreamUpdateFromProto(streamUpdate *protos.ClientStreamUpdate) StreamUpdate
func (*StreamUpdate) IsValid ¶
func (su *StreamUpdate) IsValid() error
func (*StreamUpdate) ToProto ¶
func (su *StreamUpdate) ToProto() *protos.ClientStreamUpdate
type StreamUpdateOp ¶
type StreamUpdateOp int
const ( StreamUpsert StreamUpdateOp = iota + 1 StreamDelete )
Click to show internal directories.
Click to hide internal directories.