Skip to content

Commit

Permalink
out_stackdriver: Add Special field spanId
Browse files Browse the repository at this point in the history
Ref: [fluent-bit #4224](fluent/fluent-bit#4224)

Signed-off-by: 0Delta <[email protected]>
  • Loading branch information
0Delta committed Oct 25, 2021
1 parent e4fa2ba commit e0141a4
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pipeline/outputs/stackdriver_special_fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Currently, we also support some special fields in fluent-bit:
| logging.googleapis.com/insertId | insertId | A unique identifier for the log entry. It is used to order logEntries |
| logging.googleapis.com/sourceLocation | sourceLocation | Additional information about the source code location that produced the log entry. |
| logging.googleapis.com/http_request | httpRequest | A common proto for logging HTTP requests. |
| logging.googleapis.com/spanId | spanId | The span ID within the trace associated with the log entry |
| timestamp | timestamp | An object including the seconds and nanos fields that represents the time |
| timestampSecond & timestampNanos | timestamp | The seconds and nanos that represents the time |

Expand Down Expand Up @@ -313,6 +314,34 @@ the logEntry will be:
}
```

## Span ID

The span ID within the trace associated with the log entry.

The JSON representation is as followed:
```text
"spanId": string
```

### Use Cases
Set the input log as followed:
```text
jsonPayload {
"logging.googleapis.com/spanId": "1234567890abcdef"
...
}
```
the logEntry will be:
```text
{
"jsonPayload": {
...
}
"spanId": "1234567890abcdef"
...
}
```

## Timestamp

We support two formats of time-related fields:
Expand Down

0 comments on commit e0141a4

Please sign in to comment.