Documentation ¶
Index ¶
- Constants
- func AppendMiddlewares(apiOptions *[]func(*middleware.Stack) error, opts ...Option)
- func DefaultAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue
- func DynamoDBAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue
- func OperationAttr(operation string) attribute.KeyValue
- func RegionAttr(region string) attribute.KeyValue
- func RequestIDAttr(requestID string) attribute.KeyValue
- func SQSAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue
- func SemVersion() string
- func ServiceAttr(service string) attribute.KeyValue
- func Version() string
- type AttributeSetter
- type Option
Constants ¶
const ( OperationKey attribute.Key = "aws.operation" RegionKey attribute.Key = "aws.region" ServiceKey attribute.Key = "aws.service" RequestIDKey attribute.Key = "aws.request_id" )
AWS attributes.
Variables ¶
This section is empty.
Functions ¶
func AppendMiddlewares ¶
func AppendMiddlewares(apiOptions *[]func(*middleware.Stack) error, opts ...Option)
AppendMiddlewares attaches OTel middlewares to the AWS Go SDK V2 for instrumentation. OTel middlewares can be appended to either all aws clients or a specific operation. Please see more details in https://aws.github.io/aws-sdk-go-v2/docs/middleware/
func DefaultAttributeSetter ¶
func DefaultAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue
DefaultAttributeSetter checks to see if there are service specific attributes available to set for the AWS service. If there are service specific attributes available then they will be included.
func DynamoDBAttributeSetter ¶
func DynamoDBAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue
DynamoDBAttributeSetter sets DynamoDB specific attributes depending on the DynamoDB operation being performed.
func OperationAttr ¶
OperationAttr returns the AWS operation attribute.
func RegionAttr ¶
RegionAttr returns the AWS region attribute.
func RequestIDAttr ¶
RequestIDAttr returns the AWS request ID attribute.
func SQSAttributeSetter ¶
func SQSAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue
SQSAttributeSetter sets SQS specific attributes depending on the SQS operation being performed.
func SemVersion ¶
func SemVersion() string
SemVersion is the semantic version to be supplied to tracer/meter creation.
func ServiceAttr ¶
ServiceAttr returns the AWS service attribute.
Types ¶
type AttributeSetter ¶
type AttributeSetter func(context.Context, middleware.InitializeInput) []attribute.KeyValue
AttributeSetter returns an array of KeyValue pairs, it can be used to set custom attributes.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies an option value.
func WithAttributeSetter ¶
func WithAttributeSetter(attributesetters ...AttributeSetter) Option
WithAttributeSetter specifies an attribute setter function for setting service specific attributes. If none is specified, the service will be determined by the DefaultAttributeSetter function and the corresponding attributes will be included.
func WithTextMapPropagator ¶
func WithTextMapPropagator(propagator propagation.TextMapPropagator) Option
WithTextMapPropagator specifies a Text Map Propagator to use when propagating context. If none is specified, the global TextMapPropagator is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global TracerProvider is used.