Serverless Observability
bene@theodo.co.uk
Ben Ellerby
@EllerbyBen
Not just Lambda (FaaS)
Lambda
S3
Dynamo
API Gateway
Compute
Storage
Data
API Proxy
Cognito
Auth
SQS
Queue
EventBridge
Event Bus
Lambda Triggers
@EllerbyBen
Know what’s happening
@EllerbyBen
-
The flexibility, distribution and granularity of Serverless architectures makes logging hard.
-
Cloudwatch & XRay are the minimum.
Cloudwatch
@EllerbyBen
-
Collects monitoring and operational data in the form of logs, metrics, and events, providing.
@EllerbyBen
-
Basic Lambda Metrics
@EllerbyBen
-
Dashboards
X-Ray
@EllerbyBen
-
X-Ray provides an end-to-end view of requests as they travel through your application, and shows a map of your application’s underlying components
X-Ray
@EllerbyBen
-
X-Ray provides an end-to-end view of requests as they travel through your application, and shows a map of your application’s underlying components
X-Ray: Lambda
@EllerbyBen
service: myService
provider:
name: aws
runtime: nodejs12.x
tracing:
lambda: true
X-Ray: Lambda
@EllerbyBen
functions:
hello:
handler: handler.hello
tracing: Active
goodbye:
handler: handler.goodbye
tracing: PassThrough
X-Ray: API Gateway
Active Tracing
@EllerbyBen
# serverless.yml
provider:
name: aws
tracing:
apiGateway: true
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
Basic logging is a given. Add onto this, X-Ray Logging and specialised third-party Serverless logging providers (and Cloudwatch ServiceLens).
Build to make your logs recoverable.
@EllerbyBen
@EllerbyBen
DRAFT NOT COMPLETE - Serverless Observability
By Ben Ellerby
DRAFT NOT COMPLETE - Serverless Observability
Talk given at the AWS Community Summit.
- 847