FormidableLabs / FormidableLabs/pino-lambda

Formatter is very fragile

Open
#44 2 comments 1 reaction 0 assignees View on GitHub
documentation
Dominant language
TypeScript
Stars
135
Forks
14
PR merge metrics
No merged PRs in 30d

Description

https://github.com/pinojs/pino/blob/master/docs/api.md#messagekey-string

Configuring `messageKey` will cause the formatter to fail.

Additionally we configure a formatter for `level` which returns `status`, to meet Datadog's expectations https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#reserved-attributes.

``` formatters: {
level: (label: string) => ({
status: label,
}),
},
```

Contributor guide

Open the contributing guide

Research direction

Start with the messageKey documentation in docs/api.md and reproduce the failure using the formatter configuration shown in the issue. Trace how messageKey and the level formatter are handled together; done means formatting no longer fails and the level output still uses the status attribute expected by Datadog.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
backend, cloud, observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.