Skip to content

Instantly share code, notes, and snippets.

@davidbarsky
Last active April 27, 2020 18:33
Show Gist options
  • Save davidbarsky/478a921bacb6db512c713ae50269f1c1 to your computer and use it in GitHub Desktop.
Save davidbarsky/478a921bacb6db512c713ae50269f1c1 to your computer and use it in GitHub Desktop.

Items:

  1. Better usage docs/examples. The invocation context is accessible through the INVOCATION_CTX task-local which should be documented in examples and documenation. https://github.com/awslabs/aws-lambda-rust-runtime/blob/master/lambda/src/lib.rs#L95-L97. Note that due to limitations in Tokio's task local implementation, subtasks of the invocation task (which is what we run for customers) can't access this task-local. This is a tempoary limitation.
  2. Use tracing for internal logging/instrumentation. Each interaction with the Runtime APIs should be a debug_span! and spawning a new task should a debug_span!. davidbarky@ should handle this.
  3. Slightly refactor the simulated endpoint logic to be driven by an Rng rather than a hard-coded UUID.
    1. We should add an init_failure simulated endpoint and propogate tasks out.
    2. The path routing logic can be cleaned up a bit more by using recently-stabilized Rust features.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment