Class: Instana::Exporter::Otlp::AwsConverter
- Inherits:
-
BaseConverter
- Object
- BaseConverter
- Instana::Exporter::Otlp::AwsConverter
- Defined in:
- lib/instana/exporter/otlp/aws_converter.rb
Overview
Converter for AWS SDK spans (SQS, SNS, DynamoDB) to OTLP format
Instance Method Summary collapse
- #convert_attributes ⇒ Object
-
#span_name ⇒ String
Build OTel-compliant span name for AWS SDK spans.
Methods inherited from BaseConverter
Constructor Details
This class inherits a constructor from Instana::Exporter::Otlp::BaseConverter
Instance Method Details
#convert_attributes ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/instana/exporter/otlp/aws_converter.rb', line 36 def convert_attributes attributes = {} data = span[:data] return attributes unless data convert_sqs_attributes(attributes, data[:sqs]) convert_sns_attributes(attributes, data[:sns]) convert_dynamodb_attributes(attributes, data[:dynamodb]) convert_s3_attributes(attributes, data[:s3]) convert_lambda_attributes(attributes, data.dig(:aws, :lambda, :invoke)) attributes end |
#span_name ⇒ String
Build OTel-compliant span name for AWS SDK spans
Formulas per SPAN_NAME_PATTERNS.txt Section 6:
SQS send/publish → "{queue} publish"
SQS receive/delete → "{queue} receive"
SNS → "{topic} publish"
DynamoDB → "DynamoDB.{op}" e.g. "DynamoDB.PutItem"
S3 → "S3.{op}" e.g. "S3.PutObject"
Lambda invoke → "Lambda.{function}"
26 27 28 29 30 31 32 33 34 |
# File 'lib/instana/exporter/otlp/aws_converter.rb', line 26 def span_name data = span[:data] || {} sqs_span_name(data[:sqs]) || sns_span_name(data[:sns]) || dynamodb_span_name(data[:dynamodb]) || s3_span_name(data[:s3]) || lambda_span_name(data.dig(:aws, :lambda, :invoke)) || super end |