Documentation
¶
Index ¶
- Constants
- func AppendMiddlewares(apiOptions *[]func(*middleware.Stack) error, opts ...Option)
- func DefaultAttributeBuilder(ctx context.Context, in middleware.InitializeInput, ...) []attribute.KeyValue
- func DefaultAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValuedeprecated
- func DynamoDBAttributeBuilder(ctx context.Context, in middleware.InitializeInput, ...) []attribute.KeyValue
- func DynamoDBAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValuedeprecated
- func OperationAttr(operation string) attribute.KeyValue
- func RegionAttr(region string) attribute.KeyValue
- func RequestIDAttr(requestID string) attribute.KeyValue
- func SNSAttributeBuilder(ctx context.Context, in middleware.InitializeInput, ...) []attribute.KeyValue
- func SNSAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValuedeprecated
- func SQSAttributeBuilder(ctx context.Context, in middleware.InitializeInput, ...) []attribute.KeyValue
- func SQSAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValuedeprecated
- func SemVersion() stringdeprecated
- func ServiceAttr(service string) attribute.KeyValue
- func SystemAttr() attribute.KeyValue
- func Version() string
- type AttributeBuilder
- type AttributeSetterdeprecated
- type Option
Constants ¶
const ( RegionKey attribute.Key = "aws.region" RequestIDKey attribute.Key = "aws.request_id" AWSSystemVal string = "aws-api" )
AWS attributes.
const (
// ScopeName is the instrumentation scope name.
ScopeName = "go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws"
)
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 DefaultAttributeBuilder ¶ added in v0.60.0
func DefaultAttributeBuilder(ctx context.Context, in middleware.InitializeInput, out middleware.InitializeOutput) []attribute.KeyValue
DefaultAttributeBuilder 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 DefaultAttributeSetter
deprecated
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.
Deprecated: Use DefaultAttributeBuilder instead. This will be removed in a future release.
func DynamoDBAttributeBuilder ¶ added in v0.60.0
func DynamoDBAttributeBuilder(ctx context.Context, in middleware.InitializeInput, out middleware.InitializeOutput) []attribute.KeyValue
DynamoDBAttributeBuilder sets DynamoDB specific attributes depending on the DynamoDB operation being performed.
func DynamoDBAttributeSetter
deprecated
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.
Deprecated: Use DynamoDBAttributeBuilder instead. This will be removed in a future release.
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 SNSAttributeBuilder ¶ added in v0.60.0
func SNSAttributeBuilder(ctx context.Context, in middleware.InitializeInput, out middleware.InitializeOutput) []attribute.KeyValue
SNSAttributeBuilder sets SNS specific attributes depending on the SNS operation is being performed.
func SNSAttributeSetter
deprecated
added in
v0.58.0
func SNSAttributeSetter(ctx context.Context, in middleware.InitializeInput) []attribute.KeyValue
SNSAttributeSetter sets SNS specific attributes depending on the SNS operation is being performed.
Deprecated: Use SNSAttributeBuilder instead. This will be removed in a future release.
func SQSAttributeBuilder ¶ added in v0.60.0
func SQSAttributeBuilder(ctx context.Context, in middleware.InitializeInput, out middleware.InitializeOutput) []attribute.KeyValue
SQSAttributeBuilder sets SQS specific attributes depending on the SQS operation being performed.
func SQSAttributeSetter
deprecated
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.
Deprecated: Use SQSAttributeBuilder instead. This will be removed in a future release.
func SemVersion
deprecated
added in
v0.24.0
func ServiceAttr ¶
ServiceAttr returns the AWS service attribute.
func SystemAttr ¶ added in v0.41.0
SystemAttr return the AWS RPC system attribute.
Types ¶
type AttributeBuilder ¶ added in v0.60.0
type AttributeBuilder func(ctx context.Context, in middleware.InitializeInput, out middleware.InitializeOutput) []attribute.KeyValue
AttributeBuilder returns an array of KeyValue pairs, it can be used to set custom attributes.
type AttributeSetter
deprecated
added in
v0.30.0
type AttributeSetter func(context.Context, middleware.InitializeInput) []attribute.KeyValue
AttributeSetter returns an array of KeyValue pairs, it can be used to set custom attributes.
Deprecated: Use AttributeBuilder instead. This will be removed in a future release.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies an option value.
func WithAttributeBuilder ¶ added in v0.60.0
func WithAttributeBuilder(attributeBuilders ...AttributeBuilder) Option
WithAttributeBuilder specifies an attribute setter function for setting service specific attributes. If none is specified, the service will be determined by the DefaultAttributeBuilder function and the corresponding attributes will be included.
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 DefaultAttributeBuilder 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.