telemetry

package
v0.0.0-...-bef5c4b Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

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

Index

Constants

View Source
const (
	SubscribeSuccess   = "logs_api_subscribe_success"
	SubscribeClientErr = "logs_api_subscribe_client_err"
	SubscribeServerErr = "logs_api_subscribe_server_err"
	NumSubscribers     = "logs_api_num_subscribers"
)
View Source
const (
	InitInsideInitPhase   interop.InitPhase = "init"
	InitInsideInvokePhase interop.InitPhase = "invoke"
)
View Source
const TimeFormat = "2006-01-02T15:04:05.000Z"

Variables

View Source
var ErrTelemetryServiceOff = errors.New("ErrTelemetryServiceOff")

Functions

func FormatImageError

func FormatImageError(errLog interop.ImageErrorLogData) string

func SendAgentsInitStatus

func SendAgentsInitStatus(eventsAPI interop.EventsAPI, agents []core.AgentInfo)

func SendImageError

func SendImageError(eventsAPI interop.EventsAPI, execError model.RuntimeExecError, execConfig model.RuntimeExec)

func SendInitReportLogEvent

func SendInitReportLogEvent(
	eventsAPI interop.EventsAPI,
	appCtx appctx.ApplicationContext,
	initDuration time.Duration,
	phase interop.LifecyclePhase,
	initError model.AppError,
)

func SendInitRuntimeDoneLogEvent

func SendInitRuntimeDoneLogEvent(
	eventsAPI interop.EventsAPI,
	appCtx appctx.ApplicationContext,
	phase interop.LifecyclePhase,
	initError model.AppError,
)

func SendInitStartLogEvent

func SendInitStartLogEvent(
	eventsAPI interop.EventsAPI,
	functionMetadata model.FunctionMetadata,
	logStreamName string,
	phase interop.LifecyclePhase,
)

Types

type Event

type Event struct {
	Time   string          `json:"time"`
	Type   string          `json:"type"`
	Record json.RawMessage `json:"record"`
}

type NoOpEventsAPI

type NoOpEventsAPI struct{}

func (*NoOpEventsAPI) Flush

func (s *NoOpEventsAPI) Flush()

func (*NoOpEventsAPI) SendExtensionInit

func (s *NoOpEventsAPI) SendExtensionInit(interop.ExtensionInitData) error

func (*NoOpEventsAPI) SendImageError

func (s *NoOpEventsAPI) SendImageError(interop.ImageErrorLogData)

func (*NoOpEventsAPI) SendInitReport

func (s *NoOpEventsAPI) SendInitReport(interop.InitReportData) error

func (*NoOpEventsAPI) SendInitRuntimeDone

func (s *NoOpEventsAPI) SendInitRuntimeDone(interop.InitRuntimeDoneData) error

func (*NoOpEventsAPI) SendInitStart

func (s *NoOpEventsAPI) SendInitStart(interop.InitStartData) error

func (*NoOpEventsAPI) SendInternalXRayErrorCause

func (s *NoOpEventsAPI) SendInternalXRayErrorCause(interop.InternalXRayErrorCauseData) error

func (*NoOpEventsAPI) SendInvokeStart

func (s *NoOpEventsAPI) SendInvokeStart(interop.InvokeStartData) error

func (*NoOpEventsAPI) SendReport

func (s *NoOpEventsAPI) SendReport(interop.ReportData) error

func (*NoOpEventsAPI) SetCurrentRequestID

func (s *NoOpEventsAPI) SetCurrentRequestID(interop.InvokeID)

type NoOpLogsEgressAPI

type NoOpLogsEgressAPI struct{}

func (*NoOpLogsEgressAPI) GetExtensionSockets

func (s *NoOpLogsEgressAPI) GetExtensionSockets() (io.Writer, io.Writer, error)

func (*NoOpLogsEgressAPI) GetRuntimeSockets

func (s *NoOpLogsEgressAPI) GetRuntimeSockets() (io.Writer, io.Writer, error)

type NoOpSubscriptionAPI

type NoOpSubscriptionAPI struct{}

func (*NoOpSubscriptionAPI) Clear

func (m *NoOpSubscriptionAPI) Clear()

func (*NoOpSubscriptionAPI) Configure

func (m *NoOpSubscriptionAPI) Configure(passphrase string, addr netip.AddrPort)

func (*NoOpSubscriptionAPI) FlushMetrics

func (*NoOpSubscriptionAPI) GetEndpointURL

func (m *NoOpSubscriptionAPI) GetEndpointURL() string

func (*NoOpSubscriptionAPI) GetServiceClosedErrorMessage

func (m *NoOpSubscriptionAPI) GetServiceClosedErrorMessage() string

func (*NoOpSubscriptionAPI) GetServiceClosedErrorType

func (m *NoOpSubscriptionAPI) GetServiceClosedErrorType() string

func (*NoOpSubscriptionAPI) RecordCounterMetric

func (m *NoOpSubscriptionAPI) RecordCounterMetric(metricName string, count int)

func (*NoOpSubscriptionAPI) Subscribe

func (m *NoOpSubscriptionAPI) Subscribe(agentName string, body io.Reader, headers map[string][]string, remoteAddr string) ([]byte, int, map[string][]string, error)

func (*NoOpSubscriptionAPI) TurnOff

func (m *NoOpSubscriptionAPI) TurnOff()

type StdLogsEgressAPI

type StdLogsEgressAPI interface {
	GetExtensionSockets() (io.Writer, io.Writer, error)
	GetRuntimeSockets() (io.Writer, io.Writer, error)
}

type SubscriptionAPI

type SubscriptionAPI interface {
	Subscribe(agentName string, body io.Reader, headers map[string][]string, remoteAddr string) (resp []byte, status int, respHeaders map[string][]string, err error)
	RecordCounterMetric(metricName string, count int)
	FlushMetrics() interop.TelemetrySubscriptionMetrics
	Clear()
	TurnOff()
	GetEndpointURL() string
	GetServiceClosedErrorMessage() string
	GetServiceClosedErrorType() string
	Configure(passphrase string, addr netip.AddrPort)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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