faro

package module
v0.0.0-...-d8f5dd1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package faro provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	BundleID    string `json:"bundleId,omitempty"`
	Environment string `json:"environment,omitempty"`
	Name        string `json:"name,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
	Release     string `json:"release,omitempty"`
	Version     string `json:"version,omitempty"`
}

App holds metadata about the application event originates from.

type Brand

type Brand struct {
	Brand   string `json:"brand,omitempty"`
	Version string `json:"version,omitempty"`
}

Brand represents a single browser brand.

type BrandsArray

type BrandsArray = []Brand

BrandsArray defines model for BrandsArray.

type BrandsString

type BrandsString = string

BrandsString represents brands as a string.

type Browser

type Browser struct {
	Brands         Browser_Brands `json:"brands,omitempty"`
	Language       string         `json:"language,omitempty"`
	Mobile         bool           `json:"mobile,omitempty"`
	Name           string         `json:"name,omitempty"`
	OS             string         `json:"os,omitempty"`
	UserAgent      string         `json:"userAgent,omitempty"`
	Version        string         `json:"version,omitempty"`
	ViewportHeight string         `json:"viewportHeight,omitempty"`
	ViewportWidth  string         `json:"viewportWidth,omitempty"`
}

Browser holds metadata about a client's browser.

type Browser_Brands

type Browser_Brands struct {
	// contains filtered or unexported fields
}

Browser_Brands defines model for Browser.Brands.

func (Browser_Brands) AsBrandsArray

func (t Browser_Brands) AsBrandsArray() (BrandsArray, error)

AsBrandsArray returns the union data inside the Browser_Brands as a BrandsArray

func (Browser_Brands) AsBrandsString

func (t Browser_Brands) AsBrandsString() (BrandsString, error)

AsBrandsString returns the union data inside the Browser_Brands as a BrandsString

func (*Browser_Brands) FromBrandsArray

func (t *Browser_Brands) FromBrandsArray(v BrandsArray) error

FromBrandsArray overwrites any union data inside the Browser_Brands as the provided BrandsArray

func (*Browser_Brands) FromBrandsString

func (t *Browser_Brands) FromBrandsString(v BrandsString) error

FromBrandsString overwrites any union data inside the Browser_Brands as the provided BrandsString

func (Browser_Brands) MarshalJSON

func (t Browser_Brands) MarshalJSON() ([]byte, error)

func (*Browser_Brands) MergeBrandsArray

func (t *Browser_Brands) MergeBrandsArray(v BrandsArray) error

MergeBrandsArray performs a merge with any union data inside the Browser_Brands, using the provided BrandsArray

func (*Browser_Brands) MergeBrandsString

func (t *Browser_Brands) MergeBrandsString(v BrandsString) error

MergeBrandsString performs a merge with any union data inside the Browser_Brands, using the provided BrandsString

func (*Browser_Brands) UnmarshalJSON

func (t *Browser_Brands) UnmarshalJSON(b []byte) error

type Event

type Event struct {
	Attributes map[string]string `json:"attributes,omitempty"`
	Domain     string            `json:"domain,omitempty"`
	Name       string            `json:"name"`
	Timestamp  time.Time         `json:"timestamp,omitempty"`

	// Trace holds trace id and span id associated to an entity (log, exception, measurement...).
	Trace TraceContext `json:"trace,omitempty"`
}

Event holds RUM event data.

type Exception

type Exception struct {
	Context ExceptionContext `json:"context,omitempty"`

	// Stacktrace is a collection of Frames.
	Stacktrace *Stacktrace `json:"stacktrace,omitempty"`
	Timestamp  time.Time   `json:"timestamp"`

	// Trace holds trace id and span id associated to an entity (log, exception, measurement...).
	Trace TraceContext `json:"trace,omitempty"`
	Type  string       `json:"type,omitempty"`
	Value string       `json:"value,omitempty"`
}

Exception holds all the data regarding an exception.

type ExceptionContext

type ExceptionContext map[string]string

ExceptionContext defines model for ExceptionContext.

type Frame

type Frame struct {
	Colno    int    `json:"colno,omitempty"`
	Filename string `json:"filename,omitempty"`
	Function string `json:"function,omitempty"`
	Lineno   int    `json:"lineno,omitempty"`
	Module   string `json:"module,omitempty"`
}

Frame represents a single stacktrace frame.

type Geo

type Geo struct {
	ASNID            string `json:"asn_id,omitempty"`
	ASNOrg           string `json:"asn_org,omitempty"`
	City             string `json:"city,omitempty"`
	ContinentISOCode string `json:"continent_iso,omitempty"`
	CountryISOCode   string `json:"country_iso,omitempty"`
	SubdivisionISO   string `json:"subdivision_iso,omitempty"`
}

Geo holds metadata about a client's geo.

type K6

type K6 struct {
	IsK6Browser bool `json:"isK6Browser,omitempty"`
}

K6 holds metadata about whether or not the run happened in a K6 browser.

type Kind

type Kind string

Kind defines model for Kind.

const (
	KindEvent       Kind = "event"
	KindException   Kind = "exception"
	KindLog         Kind = "log"
	KindMeasurement Kind = "measurement"
	KindUnknown     Kind = "unknown"
)

Defines values for Kind.

type Log

type Log struct {
	// Context is a string to string map structure that represents the context of a log message.
	Context LogContext `json:"context,omitempty"`

	// LogLevel log level enum for incoming app logs.
	LogLevel  LogLevel  `json:"level,omitempty"`
	Message   string    `json:"message,omitempty"`
	Timestamp time.Time `json:"timestamp"`

	// Trace holds trace id and span id associated to an entity (log, exception, measurement...).
	Trace TraceContext `json:"trace,omitempty"`
}

Log controls the data that come into a Log message.

type LogContext

type LogContext map[string]string

LogContext is a string to string map structure that represents the context of a log message.

type LogLevel

type LogLevel string

LogLevel log level enum for incoming app logs.

const (
	LogLevelDebug   LogLevel = "debug"
	LogLevelError   LogLevel = "error"
	LogLevelInfo    LogLevel = "info"
	LogLevelTrace   LogLevel = "trace"
	LogLevelWarning LogLevel = "warning"
)

Defines values for LogLevel.

type Measurement

type Measurement struct {
	Context   MeasurementContext `json:"context,omitempty"`
	Timestamp time.Time          `json:"timestamp,omitempty"`

	// Trace holds trace id and span id associated to an entity (log, exception, measurement...).
	Trace  TraceContext       `json:"trace,omitempty"`
	Type   string             `json:"type,omitempty"`
	Values map[string]float64 `json:"values,omitempty"`
}

Measurement holds the data for user provided measurements.

type MeasurementContext

type MeasurementContext map[string]string

MeasurementContext defines model for MeasurementContext.

type Meta

type Meta struct {
	// App holds metadata about the application event originates from.
	App App `json:"app,omitempty"`

	// Browser holds metadata about a client's browser.
	Browser Browser `json:"browser,omitempty"`

	// Geo holds metadata about a client's geo.
	Geo Geo `json:"geo,omitempty"`

	// K6 holds metadata about whether or not the run happened in a K6 browser.
	K6 K6 `json:"k6,omitempty"`

	// Page holds metadata about the web page event originates from.
	Page Page `json:"page,omitempty"`

	// SDK holds metadata about the app agent that produced the event.
	SDK SDK `json:"sdk,omitempty"`

	// Session holds metadata about the browser session the event originates from.
	Session Session `json:"session,omitempty"`

	// User holds metadata about the user related to an app event.
	User User `json:"user,omitempty"`

	// View holds metadata about a view.
	View View `json:"view,omitempty"`
}

Meta holds metadata about an app event.

type Overrides

type Overrides struct {
	GeoLocationTrackingEnabled bool   `json:"geoLocationTrackingEnabled,omitempty"`
	ServiceName                string `json:"serviceName,omitempty"`
}

Overrides represents session override metadata.

type Page

type Page struct {
	Attributes map[string]string `json:"attributes,omitempty"`
	ID         string            `json:"id,omitempty"`
	URL        string            `json:"url,omitempty"`
}

Page holds metadata about the web page event originates from.

type Payload

type Payload struct {
	Events       []Event       `json:"events,omitempty"`
	Exceptions   []Exception   `json:"exceptions,omitempty"`
	Logs         []Log         `json:"logs,omitempty"`
	Measurements []Measurement `json:"measurements,omitempty"`

	// Meta holds metadata about an app event.
	Meta Meta `json:"meta,omitempty"`

	// Traces otel traces model.
	Traces *Traces `json:"traces,omitempty"`
}

Payload is the body of the receiver request.

type SDK

type SDK struct {
	Integrations []SDKIntegration `json:"integrations,omitempty"`
	Name         string           `json:"name,omitempty"`
	Version      string           `json:"version,omitempty"`
}

SDK holds metadata about the app agent that produced the event.

type SDKIntegration

type SDKIntegration struct {
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

SDKIntegration holds metadata about a plugin/integration on the app agent that collected and sent the event.

type Session

type Session struct {
	Attributes map[string]string `json:"attributes,omitempty"`
	ID         string            `json:"id,omitempty"`

	// Overrides represents session override metadata.
	Overrides Overrides `json:"overrides,omitempty"`
}

Session holds metadata about the browser session the event originates from.

type SpanEvent

type SpanEvent struct {
	Attributes             *[]interface{} `json:"attributes,omitempty"`
	DroppedAttributesCount *int           `json:"droppedAttributesCount,omitempty"`
	Name                   string         `json:"name"`
	TimeUnixNano           *string        `json:"timeUnixNano,omitempty"`
}

SpanEvent defines model for SpanEvent.

type Stacktrace

type Stacktrace struct {
	Frames []Frame `json:"frames,omitempty"`
}

Stacktrace is a collection of Frames.

type SubmitPayloadJSONRequestBody

type SubmitPayloadJSONRequestBody = Payload

SubmitPayloadJSONRequestBody defines body for SubmitPayload for application/json ContentType.

type TimeFormat

type TimeFormat string

TimeFormat defines model for TimeFormat.

const (
	TimeFormatRFC3339Milli TimeFormat = "2006-01-02T15:04:05.999Z"
)

Defines values for TimeFormat.

type TraceContext

type TraceContext struct {
	SpanID  string `json:"span_id"`
	TraceID string `json:"trace_id"`
}

TraceContext holds trace id and span id associated to an entity (log, exception, measurement...).

type Traces

type Traces struct {
	ptrace.Traces
}

Traces otel traces model.

func (Traces) MarshalJSON

func (t Traces) MarshalJSON() ([]byte, error)

MarshalJSON marshals Traces model to json.

func (*Traces) UnmarshalJSON

func (t *Traces) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals Traces model.

type User

type User struct {
	Attributes map[string]string `json:"attributes,omitempty"`
	Email      string            `json:"email,omitempty"`
	ID         string            `json:"id,omitempty"`
	Username   string            `json:"username,omitempty"`
}

User holds metadata about the user related to an app event.

type View

type View struct {
	Name string `json:"name,omitempty"`
}

View holds metadata about a view.

Jump to

Keyboard shortcuts

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