Basic Observability as Code
For every application, developers must create a
index.yml file in the root of the
.baselime folder. This file is used to specify metadata on the application. This can be initialised with the Baselime CLI.
This is an interactive command to initialise the
.baselime folder. The command prompts the user for a list of serverless functions that are part of the application being initialised.
.baselime folder has been initialised, Observability as Code configurations can be defined in any
YAML file in the
.baselime folder or any of its subfolder.
It should be noted that the Baselime CLI reserves a
.out folder at the root of the
.baselime folder where OaC configurations will be ignored.
The following example shows a basic example of the files present within the
version: 0.0.15 application: users-management provider: aws infrastructure: functions: - function-A - function-B
lambda-invocations-durations: type: query properties: name: The duration of lambda invocations description: Statistics on the duration of lambda invocations across the stack parameters: dataset: logs calculations: - MAX(@duration) - MIN(@duration) - AVG(@duration) - P99(@duration) filters: - "@type = REPORT" groupBy: type: number value: "@memorySize" long-lambda-invocations: type: alert properties: name: Lambda invocations lasted more than 15seconds parameters: query: !ref lambda-invocations-durations frequency: 30 duration: 30 threshold: "> 15000" channels: - !ref developers developers: type: channel properties: type: email targets: - firstname.lastname@example.org lambda-invocations-durations-chart: type: chart properties: type: timeseries name: A random chart parameters: query: !ref lambda-invocations-durations duration: 15 main-dashboard: type: dashboard properties: name: Main dashboard charts: - !ref lambda-invocations-durations-chart
Observaility as Code