Documentation
¶
Overview ¶
Package ir contains a representation of probes as applied to a specific binary.
The key data structure is ir.Program, which represents all the information needed to describe the set of probes that will be connected to a single binary.
Index ¶
- func CompareProbeIDs[A, B ProbeIDer](a A, b B) int
- type CaptureConfig
- type EventKind
- type FunctionWhere
- type Issue
- type IssueKind
- type LineWhere
- type ProbeDefinition
- type ProbeIDer
- type ProbeIssue
- type ProbeKind
- type TemplateDefinition
- type TemplateSegmentDefinition
- type TemplateSegmentExpression
- type TemplateSegmentString
- type ThrottleConfig
- type Where
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareProbeIDs ¶
CompareProbeIDs compares two probe definitions by their ID and version.
Types ¶
type CaptureConfig ¶
type CaptureConfig interface {
GetMaxReferenceDepth() uint32
GetMaxFieldCount() uint32
GetMaxLength() uint32
GetMaxCollectionSize() uint32
}
CaptureConfig is the capture configuration of a probe.
type EventKind ¶
type EventKind uint8
EventKind is the kind of event.
const ( // EventKindEntry is an event that emits an entry. EventKindEntry EventKind // EventKindReturn is an event that emits a return. EventKindReturn // EventKindLine is an event that emits a line. EventKindLine )
type FunctionWhere ¶
FunctionWhere is a where clause of a probe that is a function.
type IssueKind ¶
type IssueKind int
IssueKind is the kind of issue that was encountered.
const ( // IssueKindInvalidProbeDefinition is an issue that was encountered while // deserializing a probe definition. IssueKindInvalidProbeDefinition IssueKind // IssueKindTargetNotFoundInBinary is an issue that was encountered while // processing a probe definition and failing to find the target in the // binary. IssueKindTargetNotFoundInBinary // IssueKindUnsupportedFeature is an issue that was encountered while // processing a probe definition that uses a feature that is not supported. IssueKindUnsupportedFeature // IssueKindMalformedExecutable is an issue that was encountered while // processing a probe definition that uses a malformed executable. IssueKindMalformedExecutable // IssueKindInvalidDWARF is an issue that was encountered while processing // a probe definition that uses an invalid DWARF. IssueKindInvalidDWARF // IssueKindDisassemblyFailed is an issue that was encountered while // disassembling an instruction. IssueKindDisassemblyFailed )
type LineWhere ¶
type LineWhere interface {
Where
Line() (functionName string, sourceFile string, lineNumber string)
}
LineWhere is a where clause of a probe that is a line within a function.
type ProbeDefinition ¶
type ProbeDefinition interface {
ProbeIDer
// GetTags returns the tags of the probe.
GetTags() []string
// GetKind returns the kind of the probe.
GetKind() ProbeKind
// GetWhere returns the where clause of the probe.
GetWhere() Where
// GetCaptureConfig returns the capture configuration of the probe.
GetCaptureConfig() CaptureConfig
// ThrottleConfig returns the throttle configuration of the probe.
GetThrottleConfig() ThrottleConfig
// GetTemplate returns the template of the probe.
GetTemplate() TemplateDefinition
}
ProbeDefinition abstracts the configuration of a probe.
type ProbeIDer ¶
type ProbeIDer interface {
// GetID returns the ID of the probe.
GetID() string
// GetVersion returns the version of the probe.
GetVersion() int
}
ProbeIDer is an interface that allows for comparison of probe definitions.
type ProbeIssue ¶
type ProbeIssue struct {
ProbeDefinition `json:"probe_definition"`
Issue `json:"issue"`
}
ProbeIssue is an issue that was encountered while processing a probe.
type ProbeKind ¶
type ProbeKind uint8
ProbeKind is the kind of probe.
const ( // ProbeKindLog is a probe that emits a log. ProbeKindLog ProbeKind // ProbeKindSpan is a probe that emits a span. ProbeKindSpan // ProbeKindMetric is a probe that updates a metric. ProbeKindMetric // ProbeKindSnapshot is a probe that emits a snapshot. // // Internally in rcjson these are log probes with capture_snapshot set to // true. ProbeKindSnapshot )
type TemplateDefinition ¶
type TemplateDefinition interface {
GetTemplateString() string
GetSegments() iter.Seq[TemplateSegmentDefinition]
}
TemplateDefinition represents the configuration-time template definition
type TemplateSegmentDefinition ¶
type TemplateSegmentDefinition interface {
TemplateSegment() // marker method
}
TemplateSegmentDefinition represents a configuration-time template segment
type TemplateSegmentExpression ¶
type TemplateSegmentExpression interface {
TemplateSegmentDefinition
GetDSL() string
GetJSON() json.RawMessage
}
TemplateSegmentExpression represents an expression segment in configuration
type TemplateSegmentString ¶
type TemplateSegmentString interface {
TemplateSegmentDefinition
GetString() string
}
TemplateSegmentString represents a string literal segment in configuration
type ThrottleConfig ¶
ThrottleConfig is the throttle configuration of a probe.