Documentation
¶
Overview ¶
Package jaeger holds the resources needed to start a Jaeger testcontainer container.
Package jaeger holds the resources needed to start a Jaeger testcontainer container.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jaeger ¶
type Jaeger struct {
Ports map[int]nat.Port
Network *testcontainers.DockerNetwork
Name string
}
Jaeger hold the testcontainer, ports and network used by Jaeger. If instantiating yourself, be sure to populate Jaeger.Network, otherwise a new network will be generated.
func (*Jaeger) GetTraces ¶
func (j *Jaeger) GetTraces(expectedTraces int, maxRetries int, service string) (Traces, string, error)
GetTraces takes in a service names and returns the last n traces corresponding to that service. There is a retry mechanism implemented; `GetTraces` will keep fetching every 2 seconds, for a maximum of `maxRetries` times, until Jaeger returns `expectedTraces` number of traces.
type Reference ¶ added in v1.1.3
type Reference struct {
RefType string `json:"refType"`
TraceID string `json:"traceID"`
SpanID string `json:"spanID"`
}
Reference holds the the relationship data between spans
type Span ¶ added in v1.1.3
type Span struct {
TraceID string `json:"traceID"`
SpanID string `json:"spanID"`
OperationName string `json:"operationName"`
References []Reference `json:"references"`
StartTime int64 `json:"startTime"`
Duration int `json:"duration"`
Tags []KeyValue `json:"tags"`
Logs []Log `json:"logs"`
ProcessID string `json:"processID"`
Warnings any `json:"warnings"`
}
Span holds the data for each span in a trace
type Traces ¶ added in v1.0.4
type Traces []struct {
TraceID string `json:"traceID"`
Spans []Span `json:"spans"`
Processes struct {
P1 struct {
ServiceName string `json:"serviceName"`
Tags []any `json:"tags"`
} `json:"p1"`
} `json:"processes"`
Warnings any `json:"warnings"`
}
Traces holds the returned traces from Jaeger.