Documentation ¶
Overview ¶
Package telemetry defines the apis and server required to interact with the subscribe to the Telemetry API for AWS lambdas. This is to enable the trigger of specific actions such as metric flushes on certain runtime events.
More information on the Telemetry API can be found at : https://docs.aws.amazon.com/lambda/latest/dg/telemetry-api.html
Index ¶
Constants ¶
View Source
const ( ApiVersion = "2022-07-01" SubscribeEndpoint api.LambdaPath = "/" + ApiVersion + "/telemetry" ProtocolHTTP string = "HTTP" PlatformSubscriptionType string = "platform" MinBufferingTimeoutMs int = 25 RuntimeDone EventType = "platform.runtimeDone" // LambdaRuntimeAvailableAddr uses the sandbox hostname must be used in the lambda runtime // note the port component can be configured LambdaRuntimeAvailableAddr = "sandbox:8083" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // Type is the only field we deserialise as it is used for flushing metrics Type EventType `json:"type"` }
Event is the telemetry event that the lambda server pushes.
Full schema can be found here: https://docs.aws.amazon.com/lambda/latest/dg/telemetry-schema-reference.html
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(addr string, log logrus.FieldLogger, hook RuntimeDoneHook) *Server
type SubscriptionDestination ¶
type SubscriptionRequest ¶
type SubscriptionRequest struct { SchemaVersion string `json:"schemaVersion"` Types []string `json:"types"` Buffering *SubscriptionBufferingConfig `json:"buffering,omitempty"` Destination *SubscriptionDestination `json:"destination,omitempty"` }
Click to show internal directories.
Click to hide internal directories.