package module
v0.49.0 Latest Latest

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 57




View Source
const (
	RegionKey    attribute.Key = "aws.region"
	RequestIDKey attribute.Key = "aws.request_id"
	AWSSystemVal string        = "aws-api"

AWS attributes.

View Source
const (
	// ScopeName is the instrumentation scope name.
	ScopeName = "go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws"


This section is empty.


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 added in v0.30.0

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 added in v0.30.0

func DynamoDBAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue

DynamoDBAttributeSetter sets DynamoDB specific attributes depending on the DynamoDB operation being performed.

func OperationAttr

func OperationAttr(operation string) attribute.KeyValue

OperationAttr returns the AWS operation attribute.

func RegionAttr

func RegionAttr(region string) attribute.KeyValue

RegionAttr returns the AWS region attribute.

func RequestIDAttr

func RequestIDAttr(requestID string) attribute.KeyValue

RequestIDAttr returns the AWS request ID attribute.

func SQSAttributeSetter added in v0.37.0

func SQSAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue

SQSAttributeSetter sets SQS specific attributes depending on the SQS operation being performed.

func SemVersion deprecated added in v0.24.0

func SemVersion() string

SemVersion is the semantic version to be supplied to tracer/meter creation.

Deprecated: Use Version instead.

func ServiceAttr

func ServiceAttr(service string) attribute.KeyValue

ServiceAttr returns the AWS service attribute.

func SystemAttr added in v0.41.0

func SystemAttr() attribute.KeyValue

SystemAttr return the AWS RPC system attribute.

func Version added in v0.24.0

func Version() string

Version is the current release version of the AWS SDKv2 instrumentation.


type AttributeSetter added in v0.30.0

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 added in v0.30.0

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 added in v0.36.4

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.


Path Synopsis
example module
test module

Jump to

Keyboard shortcuts

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