telemetry

package
v4.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 8 Imported by: 0

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

func EventsFromSnapshot(parseSnapshot devtools.Snapshot) []RUMEvent

EventsFromSnapshot extracts browser RUM events from a devtools snapshot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL