otelaws

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT, Apache-2.0, BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package otelaws provides instrumentation for the AWS SDK.

Index

Constants

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 = "github.com/bronystylecrazy/ultrastructure/otelaws"
)
View Source
const Version = "0.65.0"

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

Variables

This section is empty.

Functions

func DefaultAttributeBuilder

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 DynamoDBAttributeBuilder

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

func MethodAttr

func MethodAttr(service, operation string) attribute.KeyValue

MethodAttr returns the RPC method attribute for the AWS service and operation.

func OperationAttr deprecated

func OperationAttr(operation string) attribute.KeyValue

OperationAttr returns the AWS operation attribute.

Deprecated: use MethodAttr instead.

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 SNSAttributeBuilder

SNSAttributeBuilder sets SNS specific attributes depending on the SNS operation is being performed.

func SQSAttributeBuilder

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

func ServiceAttr deprecated

func ServiceAttr(service string) attribute.KeyValue

ServiceAttr returns the AWS service attribute.

Deprecated: use MethodAttr instead.

func SystemAttr

func SystemAttr() attribute.KeyValue

SystemAttr return the AWS RPC system attribute.

Types

type AttributeBuilder

AttributeBuilder 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 WithAttributeBuilder

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 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.

type OtelMiddlewares

type OtelMiddlewares struct {
	usotel.Telemetry
	// contains filtered or unexported fields
}

func NewMiddlewares

func NewMiddlewares() *OtelMiddlewares

func (*OtelMiddlewares) Append

func (m *OtelMiddlewares) Append(apiOptions *[]func(*middleware.Stack) error)

Jump to

Keyboard shortcuts

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