Skip to content

Feat/chapter 09 observability#24

Merged
jeastham1993 merged 14 commits into
mainfrom
feat/chapter-09-observability
Jan 22, 2026
Merged

Feat/chapter 09 observability#24
jeastham1993 merged 14 commits into
mainfrom
feat/chapter-09-observability

Conversation

@jeastham1993
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive observability capabilities to the Rust link shortener application using OpenTelemetry. It implements distributed tracing across Lambda functions and messaging systems (SQS, Kinesis) by integrating CloudEvents with embedded trace context for propagating traces across asynchronous boundaries.

Key changes:

  • Introduced OpenTelemetry initialization with trace, metric, and log providers configured for AWS Lambda and CloudWatch
  • Wrapped event payloads in CloudEvents format with traceparent extension for distributed tracing
  • Added instrumentation to all Lambda handlers and repository methods with semantic conventions for messaging operations

Reviewed changes

Copilot reviewed 40 out of 42 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
chapter-09/template.yaml Added ROTEL environment variables and Lambda layer for OpenTelemetry, CloudWatch permissions for XRay and logs
chapter-09/shared/src/observability/*.rs New observability module with OTel initialization, trace context extraction, and span linking utilities
chapter-09/shared/src/adapters.rs Added tracing instrumentation to DynamoDB repository methods
chapter-09/shared/src/url_info.rs Added tracing instrumentation to URL info fetching
chapter-09/shared/Cargo.toml Added OpenTelemetry, tracing, and CloudEvents dependencies
chapter-09/lambdas/*/src/main.rs Replaced default tracing with OTel initialization and added flush calls after handler execution
chapter-09/lambdas//src/_handler.rs Added tracing instrumentation with messaging semantic conventions
chapter-09/lambdas/*/src/event_publisher.rs Wrapped events in CloudEvents with traceparent for trace propagation
chapter-09/examples/sqs-send-traced-message/* New example demonstrating CloudEvent creation and SQS publishing with tracing
chapter-09/examples/sqs-receive-traced-message/* New example demonstrating CloudEvent consumption from SQS with span linking
chapter-09/examples/otel-simple/* New basic OpenTelemetry example with instrumented functions
chapter-09/examples/lambda-process-sqs/* Updated example to process CloudEvents with distributed tracing
chapter-09/docker-compose.yml Added Jaeger all-in-one container for local tracing
chapter-09/README.md Added CloudWatch query examples for traces and logs
chapter-09/Cargo.toml Updated workspace members to include new examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread chapter-09/shared/src/observability/utils.rs Outdated
Comment thread chapter-09/shared/src/observability/utils.rs Outdated
Comment thread chapter-09/shared/src/observability/utils.rs Outdated
Comment thread chapter-09/shared/src/observability/utils.rs Outdated
Comment thread chapter-09/lambdas/process_link_created/src/main.rs Outdated
Comment thread chapter-09/lambdas/process_link_clicked/src/event_handler.rs Outdated
Comment thread chapter-09/examples/sqs-receive-traced-message/README.md
Comment thread chapter-09/shared/src/observability/utils.rs Outdated
Comment thread chapter-09/lambdas/get_links/src/main.rs Outdated
Comment thread chapter-09/lambdas/process_link_clicked/src/event_handler.rs
jeastham1993 and others added 2 commits January 14, 2026 10:27
Update reqwest dependency from 0.12 to 0.13 across all chapters.
The explicit rustls-tls and http2 features are no longer needed
as reqwest 0.13 uses rustls-platform-verifier by default.
@jeastham1993 jeastham1993 merged commit fe5bcea into main Jan 22, 2026
40 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants