Documentation
¶
Overview ¶
Package opensearch is the opensearch trace kind: span documents of an opentelemetry connection's index, imported over a window or followed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Params ¶
type Params struct {
// Connection is the opentelemetry connection whose OpenSearch index holds
// the spans.
Connection string `json:"connection" clicky:"required,title=Connection"`
// Index, Format and DateField override the connection's defaults:
// otel-traces-*, flat, and @timestamp.
Index string `json:"index,omitempty" clicky:"title=Index"`
Format string `json:"format,omitempty" clicky:"title=Format"`
DateField string `json:"dateField,omitempty" clicky:"title=Date field"`
// Search narrows the spans read.
Search *esdsl.Search `json:"search,omitempty"`
// From and To bound the window, as date math such as now-1h or RFC3339.
From string `json:"from,omitempty" clicky:"title=From"`
To string `json:"to,omitempty" clicky:"title=To"`
// Follow goes on reading the spans indexed after the window, until the
// session stops; it has no To.
Follow bool `json:"follow,omitempty" clicky:"title=Follow"`
// Poll and Lag, durations such as 2s, pace a follow and hold it behind now.
Poll string `json:"poll,omitempty" clicky:"title=Poll"`
Lag string `json:"lag,omitempty" clicky:"title=Lag"`
}
Params choose the index and the window a capture reads.
type Span ¶
type Span struct {
Timestamp time.Time `json:"timestamp" pretty:"label=Time" sort:"timestamp"`
TraceID string `json:"traceId" pretty:"label=Trace" filter:"exact"`
SpanID string `json:"spanId" pretty:"label=Span" filter:"exact"`
ParentID string `json:"parentId,omitempty" pretty:"label=Parent" filter:"exact"`
Service string `json:"service" filter:"terms"`
Operation string `json:"operation" filter:"terms"`
Status string `json:"status,omitempty" filter:"terms"`
DurationMs float64 `json:"durationMs" pretty:"label=Duration,type=duration,unit=ms" sort:"durationMs"`
Attributes map[string]any `json:"attributes,omitempty" pretty:"hide"`
SourceIndex string `json:"sourceIndex" pretty:"hide"`
SourceID string `json:"sourceId" pretty:"hide"`
SourceKey string `json:"sourceKey" pretty:"hide"`
}
Span is one span document as a capture stores it. SourceKey, its index and id, keys it: a span read twice, by overlapping reads, is stored once.
Click to show internal directories.
Click to hide internal directories.