Documentation ¶
Overview ¶
Package instaawssdk instruments github.com/aws/aws-sdk-go
Index ¶
- Constants
- func FinalizeDynamoDBSpan(req *request.Request)
- func FinalizeInvokeLambdaSpan(req *request.Request)
- func FinalizeS3Span(req *request.Request)
- func FinalizeSNSSpan(req *request.Request)
- func FinalizeSQSSpan(req *request.Request)
- func InstrumentSession(sess *session.Session, sensor instana.TracerLogger)
- func New(sensor instana.TracerLogger, cfgs ...*aws.Config) *session.Session
- func NewSession(sensor instana.TracerLogger, cfgs ...*aws.Config) (*session.Session, error)
- func NewSessionWithOptions(sensor instana.TracerLogger, opts session.Options) (*session.Session, error)
- func SNSMessageAttributesCarrier(attrs map[string]*sns.MessageAttributeValue) messageAttributesCarrier
- func SQSMessageAttributesCarrier(attrs map[string]*sqs.MessageAttributeValue) messageAttributesCarrier
- func SpanContextFromSQSMessage(msg *sqs.Message, sensor instana.TracerLogger) (opentracing.SpanContext, bool)
- func StartDynamoDBSpan(req *request.Request, sensor instana.TracerLogger)
- func StartInvokeLambdaSpan(req *request.Request, sensor instana.TracerLogger)
- func StartS3Span(req *request.Request, sensor instana.TracerLogger)
- func StartSNSSpan(req *request.Request, sensor instana.TracerLogger)
- func StartSQSSpan(req *request.Request, sensor instana.TracerLogger)
- func TraceSQSMessage(msg *sqs.Message, sensor instana.TracerLogger) opentracing.Span
- type LambdaClientContext
- type LambdaClientContextClientApplication
Constants ¶
const ( // FieldT is the trace ID message attribute key FieldT = "X_INSTANA_T" // FieldS is the span ID message attribute key FieldS = "X_INSTANA_S" // FieldL is the trace level message attribute key FieldL = "X_INSTANA_L" )
const Version = "1.24.2"
Version is the instrumentation module semantic version
Variables ¶
This section is empty.
Functions ¶
func FinalizeDynamoDBSpan ¶
FinalizeDynamoDBSpan retrieves tags from completed request.Request and adds them to the span
func FinalizeInvokeLambdaSpan ¶ added in v1.1.0
FinalizeInvokeLambdaSpan retrieves error from completed request.Request if any and adds it to the span
func FinalizeS3Span ¶
FinalizeS3Span retrieves tags from completed request.Request and adds them to the span
func FinalizeSNSSpan ¶
FinalizeSNSSpan retrieves tags from completed request.Request and adds them to the span
func FinalizeSQSSpan ¶
FinalizeSQSSpan retrieves tags from completed request.Request and adds them to the span
func InstrumentSession ¶
func InstrumentSession(sess *session.Session, sensor instana.TracerLogger)
InstrumentSession instruments github.com/aws/aws-sdk-go/aws/session.Session by injecting handlers to create and finalize Instana spans
func NewSession ¶ added in v1.2.0
NewSession is a wrapper for `session.NewSession`
func NewSessionWithOptions ¶ added in v1.2.0
func NewSessionWithOptions(sensor instana.TracerLogger, opts session.Options) (*session.Session, error)
NewSessionWithOptions is a wrapper for `session.NewSessionWithOptions`
func SNSMessageAttributesCarrier ¶
func SNSMessageAttributesCarrier(attrs map[string]*sns.MessageAttributeValue) messageAttributesCarrier
SNSMessageAttributesCarrier creates a new trace context carrier suitable for (opentracing.Tracer).Inject() that uses SNS message attributes as a storage
func SQSMessageAttributesCarrier ¶
func SQSMessageAttributesCarrier(attrs map[string]*sqs.MessageAttributeValue) messageAttributesCarrier
SQSMessageAttributesCarrier creates a new trace context carrier suitable for (opentracing.Tracer).Inject() that uses SQS message attributes as a storage
func SpanContextFromSQSMessage ¶
func SpanContextFromSQSMessage(msg *sqs.Message, sensor instana.TracerLogger) (opentracing.SpanContext, bool)
SpanContextFromSQSMessage returns the trace context from an SQS message
func StartDynamoDBSpan ¶
func StartDynamoDBSpan(req *request.Request, sensor instana.TracerLogger)
StartDynamoDBSpan initiates a new span from an AWS DynamoDB request and injects it into the request.Request context
func StartInvokeLambdaSpan ¶ added in v1.1.0
func StartInvokeLambdaSpan(req *request.Request, sensor instana.TracerLogger)
StartInvokeLambdaSpan initiates a new span from an AWS Invoke request and injects it into the request.Request context
func StartS3Span ¶
func StartS3Span(req *request.Request, sensor instana.TracerLogger)
StartS3Span initiates a new span from an AWS S3 request and injects it into the request.Request context
func StartSNSSpan ¶
func StartSNSSpan(req *request.Request, sensor instana.TracerLogger)
StartSNSSpan initiates a new span from an AWS SNS request and injects it into the request.Request context
func StartSQSSpan ¶
func StartSQSSpan(req *request.Request, sensor instana.TracerLogger)
StartSQSSpan initiates a new span from an AWS SQS request and injects it into the request.Request context
func TraceSQSMessage ¶
func TraceSQSMessage(msg *sqs.Message, sensor instana.TracerLogger) opentracing.Span
TraceSQSMessage creates an returns an entry span for an SQS message. The context of this span is injected into message attributes. This context can than be retrieved with instaawssdk.SpanContextFromSQSMessage() and used in the message handler method to continue the trace.
Types ¶
type LambdaClientContext ¶ added in v1.1.0
type LambdaClientContext struct { Client LambdaClientContextClientApplication Env map[string]string `json:"env"` Custom map[string]string `json:"custom"` }
LambdaClientContext represents ClientContext from the AWS Invoke call https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_RequestSyntax.
func NewLambdaClientContextFromBase64EncodedJSON ¶ added in v1.1.0
func NewLambdaClientContextFromBase64EncodedJSON(data string) (LambdaClientContext, error)
NewLambdaClientContextFromBase64EncodedJSON creates LambdaClientContext from the base64 encoded JSON or returns error if there is decoding error.
func (*LambdaClientContext) Base64JSON ¶ added in v1.1.0
func (lc *LambdaClientContext) Base64JSON() (string, error)
Base64JSON marshal LambdaClientContext to JSON and returns it as the base64 encoded string or error if any occurs.
type LambdaClientContextClientApplication ¶ added in v1.1.0
type LambdaClientContextClientApplication struct { InstallationID string `json:"installation_id"` AppTitle string `json:"app_title"` AppVersionCode string `json:"app_version_code"` AppPackageName string `json:"app_package_name"` }
LambdaClientContextClientApplication represent client application specific data part of the LambdaClientContext.