telemetry-rust
use INFO;
// middleware::axum is available if feature flag axum is on
use ;
async
async
AWS SDK instrumentation
AwsInstrumented
trait
let res = dynamo_client
.get_item
.table_name
.index_name
.set_key
.send
.instrument
.await;
Low level API
Creating new span:
// create new span in the current span's context using either a dedicated constructor
let aws_span = get_item.start;
// or a generic one
let aws_span = dynamodb.start;
// optionally, provide an explicit parent context
let context = current.context;
let aws_span = get_item.context.start;
// or set custom span attributes
let aws_span = get_item
.attribute
.attributes
.start;
Ending the span once AWS operation is complete:
let res = dynamo_client
.get_item
.table_name
.index_name
.set_key
.send
.await;
aws_span.end;
Only the following AWS targets are fully supported at the moment:
- DynamoDB
- SNS
- Firehose
But a generic AwsSpanBuilder
could be used to instrument any other AWS SDK:
let s3_span = client
.start;
AWS Lambda instrumentation
async
Publishing new version
New version could be published using cargo-release: