Documentation ¶
Index ¶
- func CheckIsInferredSpan(span *pb.Span) bool
- func CreateServiceMapping(val string) map[string]string
- func DetermineServiceName(serviceMapping map[string]string, specificKey string, genericKey string, ...) string
- func FilterFunctionTags(input map[string]string) map[string]string
- func GenerateSpanId() uint64
- func GetServiceMapping() map[string]string
- func IsInferredSpansEnabled() bool
- func SetServiceMapping(newServiceMapping map[string]string)
- type InferredSpan
- func (inferredSpan *InferredSpan) AddTagToInferredSpan(key string, value string)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithAPIGatewayHTTPEvent(eventPayload events.APIGatewayV2HTTPRequest)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithAPIGatewayRESTEvent(eventPayload events.APIGatewayProxyRequest)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithAPIGatewayWebsocketEvent(eventPayload events.APIGatewayWebsocketProxyRequest)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithDynamoDBEvent(eventPayload events.DynamoDBEvent)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithEventBridgeEvent(eventPayload events.EventBridgeEvent)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithKinesisEvent(eventPayload events.KinesisEvent)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithLambdaFunctionURLEvent(eventPayload events.LambdaFunctionURLRequest)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithS3Event(eventPayload events.S3Event)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithSNSEvent(eventPayload events.SNSEvent)
- func (inferredSpan *InferredSpan) EnrichInferredSpanWithSQSEvent(eventPayload events.SQSEvent)
- func (inferredSpan *InferredSpan) GenerateInferredSpan(startTime time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIsInferredSpan ¶
CheckIsInferredSpan determines if a span belongs to a managed service or not _inferred_span.tag_source = "self" => managed service span _inferred_span.tag_source = "lambda" or missing => lambda related span
func CreateServiceMapping ¶
func DetermineServiceName ¶
func FilterFunctionTags ¶
FilterFunctionTags filters out DD tags & function specific tags
func GenerateSpanId ¶
func GenerateSpanId() uint64
GenerateSpanId creates a secure random span id in specific scenarios, otherwise return a pseudo random id
func GetServiceMapping ¶
This function gets a snapshot of the current service mapping without modifying it.
func IsInferredSpansEnabled ¶
func IsInferredSpansEnabled() bool
IsInferredSpansEnabled is used to determine if we need to generate and enrich inferred spans for a particular invocation
func SetServiceMapping ¶
SetServiceMapping sets the serviceMapping global variable, primarily for tests.
Types ¶
type InferredSpan ¶
type InferredSpan struct { Span *pb.Span IsAsync bool // CurrentInvocationStartTime is the start time of the // current invocation not he inferred span. It is used // for async function calls to calculate the duration. CurrentInvocationStartTime time.Time }
InferredSpan contains the pb.Span and Async information of the inferredSpan for the current invocation
func (*InferredSpan) AddTagToInferredSpan ¶
func (inferredSpan *InferredSpan) AddTagToInferredSpan(key string, value string)
AddTagToInferredSpan is used to add new tags to the inferred span in inferredSpan.Span.Meta[]. Should be used before completing an inferred span.
func (*InferredSpan) EnrichInferredSpanWithAPIGatewayHTTPEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithAPIGatewayHTTPEvent(eventPayload events.APIGatewayV2HTTPRequest)
EnrichInferredSpanWithAPIGatewayHTTPEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from a HTTP event.
func (*InferredSpan) EnrichInferredSpanWithAPIGatewayRESTEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithAPIGatewayRESTEvent(eventPayload events.APIGatewayProxyRequest)
EnrichInferredSpanWithAPIGatewayRESTEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from a REST event.
func (*InferredSpan) EnrichInferredSpanWithAPIGatewayWebsocketEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithAPIGatewayWebsocketEvent(eventPayload events.APIGatewayWebsocketProxyRequest)
EnrichInferredSpanWithAPIGatewayWebsocketEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from a Websocket event.
func (*InferredSpan) EnrichInferredSpanWithDynamoDBEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithDynamoDBEvent(eventPayload events.DynamoDBEvent)
EnrichInferredSpanWithDynamoDBEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from a DynamoDB event.
func (*InferredSpan) EnrichInferredSpanWithEventBridgeEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithEventBridgeEvent(eventPayload events.EventBridgeEvent)
EnrichInferredSpanWithEventBridgeEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from an EventBridge event.
func (*InferredSpan) EnrichInferredSpanWithKinesisEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithKinesisEvent(eventPayload events.KinesisEvent)
EnrichInferredSpanWithKinesisEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from a Kinesis event.
func (*InferredSpan) EnrichInferredSpanWithLambdaFunctionURLEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithLambdaFunctionURLEvent(eventPayload events.LambdaFunctionURLRequest)
EnrichInferredSpanWithLambdaFunctionURLEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from a Lambda Function URL event.
func (*InferredSpan) EnrichInferredSpanWithS3Event ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithS3Event(eventPayload events.S3Event)
EnrichInferredSpanWithS3Event uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from an S3 event.
func (*InferredSpan) EnrichInferredSpanWithSNSEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithSNSEvent(eventPayload events.SNSEvent)
EnrichInferredSpanWithSNSEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from an SNS event.
func (*InferredSpan) EnrichInferredSpanWithSQSEvent ¶
func (inferredSpan *InferredSpan) EnrichInferredSpanWithSQSEvent(eventPayload events.SQSEvent)
EnrichInferredSpanWithSQSEvent uses the parsed event payload to enrich the current inferred span. It applies a specific set of data to the span expected from an SQS event.
func (*InferredSpan) GenerateInferredSpan ¶
func (inferredSpan *InferredSpan) GenerateInferredSpan(startTime time.Time)
GenerateInferredSpan declares and initializes a new inferred span with a SpanID