clientmodels

package
v1.7.24 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientExceptionStackTrace

type ClientExceptionStackTrace struct {
	TraceId            *string           `json:"traceId"`
	IsTask             bool              `json:"isTask"`
	StackTrace         string            `json:"stackTrace"`
	RecordedAt         time.Time         `json:"recordedAt"`
	Attributes         map[string]string `json:"attributes"`
	IsMessage          bool              `json:"isMessage"`
	SessionRecordingId *string           `json:"sessionRecordingId"`
	SessionId          *string           `json:"sessionId"`
	DistributedTraceId *string           `json:"distributedTraceId"`
}

func (*ClientExceptionStackTrace) ToExceptionStackTrace

func (c *ClientExceptionStackTrace) ToExceptionStackTrace(exceptionHash, appVersion, serverName string) models.ExceptionStackTrace

type ClientMetricRecord

type ClientMetricRecord struct {
	Name       string            `json:"name"`
	Value      float64           `json:"value"`
	RecordedAt time.Time         `json:"recordedAt"`
	Tags       map[string]string `json:"tags,omitempty"`
}

func (*ClientMetricRecord) ToMetricPoint

func (c *ClientMetricRecord) ToMetricPoint(serverName string) models.MetricPoint

type ClientSession

type ClientSession struct {
	Id                 string            `json:"id"`
	StartedAt          time.Time         `json:"startedAt"`
	EndedAt            *time.Time        `json:"endedAt,omitempty"`
	ClientIP           string            `json:"clientIP"`
	Attributes         map[string]string `json:"attributes"`
	DistributedTraceId string            `json:"distributedTraceId,omitempty"`
}

func (*ClientSession) ToSession

func (c *ClientSession) ToSession(appVersion, serverName string) models.Session

type ClientSessionRecording

type ClientSessionRecording struct {
	ExceptionId  string          `json:"exceptionId"`
	SessionId    string          `json:"sessionId,omitempty"`
	SegmentIndex int32           `json:"segmentIndex,omitempty"`
	Events       json.RawMessage `json:"events"`
	// Logs and Actions are opaque to the backend — they ride into S3 alongside
	// Events without ever being inspected. App console logs from session
	// recordings are intentionally NOT inserted into the OTel logs ClickHouse
	// table; they live exclusively inside the S3 recording file.
	Logs      json.RawMessage `json:"logs,omitempty"`
	Actions   json.RawMessage `json:"actions,omitempty"`
	StartedAt *time.Time      `json:"startedAt,omitempty"`
	EndedAt   *time.Time      `json:"endedAt,omitempty"`
}

type ClientSpan

type ClientSpan struct {
	Id        string        `json:"id"`
	Name      string        `json:"name"`
	StartTime time.Time     `json:"startTime"`
	Duration  time.Duration `json:"duration"`
}

func (*ClientSpan) ParsedId

func (c *ClientSpan) ParsedId() uuid.UUID

ParsedId returns the span ID as uuid.UUID

func (*ClientSpan) ToSpan

func (c *ClientSpan) ToSpan(traceId uuid.UUID) models.Span

type ClientTrace

type ClientTrace struct {
	Id                 string            `json:"id"`
	Endpoint           string            `json:"endpoint"`
	Duration           time.Duration     `json:"duration"`
	RecordedAt         time.Time         `json:"recordedAt"`
	StatusCode         int               `json:"statusCode"`
	BodySize           int               `json:"bodySize"`
	ClientIP           string            `json:"clientIP"`
	Attributes         map[string]string `json:"attributes"`
	Spans              []*ClientSpan     `json:"spans"`
	IsTask             bool              `json:"isTask"`
	DistributedTraceId string            `json:"distributedTraceId"`
}

func (*ClientTrace) ParsedId

func (c *ClientTrace) ParsedId() uuid.UUID

ParsedId returns the trace ID as uuid.UUID

func (*ClientTrace) ToEndpoint

func (c *ClientTrace) ToEndpoint(appVersion, serverName string) models.Endpoint

func (*ClientTrace) ToTask

func (c *ClientTrace) ToTask(appVersion, serverName string) models.Task

type CollectionFrame

type CollectionFrame struct {
	StackTraces       []*ClientExceptionStackTrace `json:"stackTraces"`
	Metrics           []*ClientMetricRecord        `json:"metrics"`
	Traces            []*ClientTrace               `json:"traces"`
	SessionRecordings []*ClientSessionRecording    `json:"sessionRecordings"`
	Sessions          []*ClientSession             `json:"sessions"`
}

Jump to

Keyboard shortcuts

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