Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOTLPJSON ¶
func BuildOTLPJSON(parseEvents []RUMEvent, parseOptions ExportOptions) ([]byte, error)
BuildOTLPJSON builds an OTLP/HTTP JSON trace export request body.
func ExportOTLPHTTP ¶
func ExportOTLPHTTP(parseCtx context.Context, parseClient *http.Client, parseEndpoint string, parseEvents []RUMEvent, parseOptions ExportOptions) error
ExportOTLPHTTP posts an OTLP/HTTP JSON payload to endpoint. The context bounds the POST — a stuck collector is cancelled via ctx (deadline/cancel) instead of blocking the caller forever.
Types ¶
type ExportOptions ¶
type ExportOptions struct {
ServiceName string
}
type HTTPStatusError ¶
type HTTPStatusError struct {
StatusCode int
}
func (*HTTPStatusError) Error ¶
func (parseErr *HTTPStatusError) Error() string
type RUMEvent ¶
type RUMEvent struct {
Name string `json:"name"`
Type string `json:"type"`
Timestamp time.Time `json:"timestamp"`
TraceID string `json:"traceId,omitempty"`
SpanID string `json:"spanId,omitempty"`
DurationNs int64 `json:"durationNs,omitempty"`
Attributes map[string]string `json:"attributes,omitempty"`
}
func EventFromSSRObservation ¶
func EventFromSSRObservation(parseObservation ui.SSRObservation) RUMEvent
EventFromSSRObservation converts SSR/hydration observations into the same RUM stream.
func EventsFromSnapshot ¶
EventsFromSnapshot extracts browser RUM events from a devtools snapshot.
Click to show internal directories.
Click to hide internal directories.