Skip to content

Commit a32a797

Browse files
committed
Add documentation to the modules
1. Missing documentation for the trace module in lambda-runtime/src/layers/mod.rs: • Added: /// Tracing utilities for Lambda runtime. 2. Missing documentation for the request_span function in lambda-runtime/src/layers/trace.rs: • Added documentation explaining what the function does and its behavior with different context parameters
1 parent c788636 commit a32a797

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lambda-runtime/src/layers/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ mod api_response;
44
mod panic;
55

66
// Publicly available services.
7+
/// Tracing utilities for Lambda runtime.
78
pub mod trace;
89

910
pub(crate) use api_client::RuntimeApiClientService;

lambda-runtime/src/layers/trace.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ where
5656

5757
/* ------------------------------------------- UTILS ------------------------------------------- */
5858

59+
/// Creates a tracing span for a Lambda request with context information.
60+
///
61+
/// This function creates a span that includes the request ID and optionally
62+
/// the X-Ray trace ID and tenant ID if they are available in the context.
5963
pub fn request_span(ctx: &Context) -> tracing::Span {
6064
match (&ctx.xray_trace_id, &ctx.tenant_id) {
6165
(Some(trace_id), Some(tenant_id)) => {

0 commit comments

Comments
 (0)