awslabs / awslabs/aws-lambda-powershell-runtime

JSON logging support

Aperta
#40 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PowerShell
Stelle
65
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

AWS Lambda offers support for both [plain-text and JSON format logs](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs-logformat.html).

Lambda exposes this configuration via the `AWS_LAMBDA_LOG_FORMAT` environment variable. It's currently missing from the [environment variable documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime) (see case 175226052300866), but the variable appears to be set to either `Text` or `JSON` depending on customer configuration.

There's a couple of aspects to supporting this:
* Runtime-intrinsic logs (e.g. anything that's `Write-Host '[RUNTIME-<...>'`)
* Customer logs that use:
* Unstructured string-only logs (`Write-Debug`, `-Verbose`, `-Warning`)
* Unstructured partially-formatted logs (`Write-Host`)
* Structured logs via `Write-Information`
* Implicit log events (e.g. ErrorRecords generated from parser errors)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reading the linked AWS Lambda logging documentation and tracing how AWS_LAMBDA_LOG_FORMAT relates to the runtime's existing handling of Write-Host, Write-Debug, -Verbose, -Warning, Write-Information, and implicit ErrorRecords. Done means defining and implementing JSON and plain-text behavior for runtime-intrinsic, customer, structured, and implicit log events.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, powershell
Ambito
cloud, observability-sre
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.