Tracing
Saving Traces in S3
The Tracer supports saving traces to Amazon S3 buckets for persistent storage and analysis. This is particularly useful for long-term storage of traces and for sharing traces across different environments.
Configuration
To enable S3 storage for your traces, you’ll need to configure the Tracer with your AWS credentials and bucket information:
s3_aws_access_key_id
, s3_aws_secret_access_key
, and s3_region_name
are optional. If they are not provided, your AWS credentials will be searched for in the following order:
- Environment variables:
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
, andAWS_REGION
- Configuration file:
~/.aws/credentials
Trace Management in S3
- Traces will be stored in the following folder structure:
{bucket_name}/traces/{s3_bucket_name}/{trace_id}_{timestamp}.json
- The specified S3 bucket will be created automatically if it doesn’t exist
- Make sure your AWS credentials have sufficient permissions to:
- Create buckets (if the bucket doesn’t exist)
- Write objects to the bucket
- List objects in the bucket
- Read objects from the bucket
- Traces stored in S3 can be accessed using standard AWS tools, such as the AWS CLI or the AWS Management Console. Each trace is stored as a separate object in the bucket, with a unique identifier and timestamp.
For the folder structure of the saved traces, timestamp
refers to the UTC timestamp of when the trace was saved in format YYYYMMDD_HHMMSS
.