diff --git a/pipeline/outputs/stackdriver_special_fields.md b/pipeline/outputs/stackdriver_special_fields.md index 11c9769f7..dea2f8fb2 100644 --- a/pipeline/outputs/stackdriver_special_fields.md +++ b/pipeline/outputs/stackdriver_special_fields.md @@ -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 | @@ -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: