telemetry

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStartSpan

func IsStartSpan(span sdktrace.ReadOnlySpan) bool

Types

type Span

type Span struct {
	// Required Fields:
	//
	// ID is a unique identifier for this span.
	ID string `json:"id"`

	// ParentID is the span id of the previous caller of this span.  This
	// can be empty if this is the first span.
	ParentID string `json:"parentId"`

	// TransactionID is the ID generated for this span transaction
	TransactionID string `json:"transactionId"`

	// Runtime the runtime which lambda runs on
	Runtime string `json:"runtime"`

	// Region the region which lambda runs
	Region string `json:"region"`

	// Event is the lambda event triggered the lambda
	Event string `json:"event"`

	// Token is the lumigo token needed to send the spans later
	// from file extensions
	Token string `json:"token"`

	// MemoryAllocated the requested memory for this lambda
	MemoryAllocated string `json:"memoryAllocated"`

	// Account represents the AWS Account ID
	Account string `json:"account"`

	// Envs the environments variables of lambda
	LambdaEnvVars string `json:"envs"`

	// LambdaType the type of the lambda function etc.
	LambdaType string `json:"type"`

	// LambdaName the name of the lambda
	LambdaName string `json:"name"`

	// LambdaReadiness is if lambda is cold or warmed already
	LambdaReadiness string `json:"readiness"`

	// LambdaResponse the response of Lambda
	LambdaResponse *string `json:"return_value"`

	// LambdaContainerID the id of the lambda container
	LambdaContainerID string `json:"lambda_container_id"`

	// SpanInfo extra info for span
	SpanInfo SpanInfo `json:"info"`

	// StartedTimestamp when this span started
	StartedTimestamp int64 `json:"started"`

	// EndedTimestamp when this span ended
	EndedTimestamp int64 `json:"ended"`

	// MaxFinishTime the max finish tiem of lambda
	MaxFinishTime int64 `json:"maxFinishTime"`

	// SpanError error details
	SpanError *SpanError `json:"error"`
}

Span is a distributed tracing span.

type SpanError

type SpanError struct {
	Type       string `json:"type"`
	Message    string `json:"message"`
	Stacktrace string `json:"stacktrace"`
}

SpanError the extra info if lambda returned an error

func (SpanError) IsEmpty

func (s SpanError) IsEmpty() bool

type SpanHttpCommon added in v0.3.0

type SpanHttpCommon struct {
	URI        *string `json:"uri,omitempty"`
	Method     *string `json:"method,omitempty"`
	StatusCode *int64  `json:"statusCode,omitempty"`
	InstanceID *string `json:"instance_id,omitempty"`
	Body       string  `json:"body,omitempty"`
	Headers    string  `json:"headers,omitempty"`
}

SpanHttpRequest the span for the HTTP request

type SpanHttpInfo added in v0.3.0

type SpanHttpInfo struct {
	Host     string         `json:"host"`
	Request  SpanHttpCommon `json:"request"`
	Response SpanHttpCommon `json:"response"`
}

SpanHttpInfo extra info for HTTP reuquests

type SpanInfo

type SpanInfo struct {
	LogStreamName string        `json:"logStreamName"`
	LogGroupName  string        `json:"logGroupName"`
	TraceID       SpanTraceRoot `json:"traceId"`
	TracerVersion TracerVersion `json:"tracer"`
	HttpInfo      *SpanHttpInfo `json:"httpInfo,omitempty"`
}

SpanInfo extra info for span

type SpanTraceRoot

type SpanTraceRoot struct {
	Root string `json:"Root"`
}

SpanTraceRoot the amazon X-Trace-ID

type TracerVersion

type TracerVersion struct {
	Version string `json:"version"`
}

TracerVersion the version info for the tracer which captured the spans

Jump to

Keyboard shortcuts

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