Skip to content

Commit c24003e

Browse files
committed
out_stackdriver: Add Special field spanId
Ref: [fluent-bit #4224](fluent/fluent-bit#4224) Signed-off-by: 0Delta <[email protected]>
1 parent 63a49af commit c24003e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pipeline/outputs/stackdriver_special_fields.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Currently, we also support some special fields in fluent-bit:
1111
| logging.googleapis.com/sourceLocation | sourceLocation | Additional information about the source code location that produced the log entry. |
1212
| logging.googleapis.com/http_request | httpRequest | A common proto for logging HTTP requests. |
1313
| logging.googleapis.com/trace | trace | Resource name of the trace associated with the log entry |
14+
| logging.googleapis.com/spanId | spanId | The span ID within the trace associated with the log entry |
1415
| timestamp | timestamp | An object including the seconds and nanos fields that represents the time |
1516
| timestampSecond & timestampNanos | timestamp | The seconds and nanos that represents the time |
1617

@@ -324,11 +325,21 @@ The JSON representation is as followed:
324325
"trace": string
325326
```
326327

328+
## Span ID
329+
330+
The span ID within the trace associated with the log entry.
331+
332+
The JSON representation is as followed:
333+
```text
334+
"spanId": string
335+
```
336+
327337
### Use Cases
328338
Set the input log as followed:
329339
```text
330340
jsonPayload {
331341
"logging.googleapis.com/trace": "0123456789abcdef0123456789abcdef"
342+
"logging.googleapis.com/spanId": "1234567890abcdef"
332343
...
333344
}
334345
```
@@ -339,6 +350,7 @@ the logEntry will be:
339350
...
340351
}
341352
"trace": "projects/your-project-name/traces/0123456789abcdef0123456789abcdef"
353+
"spanId": "1234567890abcdef"
342354
...
343355
}
344356
```

0 commit comments

Comments
 (0)