Skip to content

Commit

Permalink
docs: explain open telemetry support
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Aug 30, 2022
1 parent 064a4af commit 6884207
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ cat <log-file> | pjl --level 20

To be pretty printable the basic json line needs to have:

Either PinoJS log message

```typescript
/** Base log object every log object should have at minimum these three keys */
export interface LogMessage extends Record<string, any> {
Expand All @@ -42,3 +44,16 @@ export interface LogMessage extends Record<string, any> {
msg: string;
}
```

A [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md) Log Message

```typescript
export interface LogMessageOpenTelemetry {
/** Timestamp in nanoseconds if a string, or ms if a number */
Timestamp: number | string
/** Message body */
Body?: unknown;
Resource?: Record<string, unknown>;
Attributes?: Record<string, unknown>;
}
```

0 comments on commit 6884207

Please sign in to comment.