Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions vercel/assets/logs/vercel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ pipeline:
enabled: true
sources:
- proxy.timestamp
- type: trace-id-remapper
name: Define `traceId` as the official trace ID of the log
enabled: true
sources:
- traceId
- type: span-id-remapper
name: Define `spanId` as the official span ID of the log
enabled: true
sources:
- spanId
metrics:
- name: vercel.functions.invocations
query: source:vercel @source:lambda REPORT
Expand Down
6 changes: 5 additions & 1 deletion vercel/assets/logs/vercel_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ tests:
"message" : "START RequestId: 85ea8a46-d63e-4fe3-ad03-ade7c16cd36b Version: $LATEST END RequestId: 85ea8a46-d63e-4fe3-ad03-ade7c16cd36b REPORT RequestId: 85ea8a46-d63e-4fe3-ad03-ade7c16cd36b Duration: 0.58 ms Billed Duration: 1 ms Memory Size: 1024 MB Max Memory Used: 31 MB",
"projectId" : "prj_WTsCRsCir3qyRE9iijJyTc7PqywW",
"timestamp" : "2021-08-24T15:43:17.812Z",
"tags" : [ "source:vercel" ]
"tags" : [ "source:vercel" ],
"traceId" : "85ea8a46-d63e-4fe3-ad03-ade7c16cd36b",
"spanId": "1012381427123789198737891237891"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In reality, Vercel sends this in hex, while the span ID is actually in decimal. Will update this test in a follow-up PR!

}
result:
custom:
Expand Down Expand Up @@ -64,4 +66,6 @@ tests:
tags:
- "source:LOGS_SOURCE"
timestamp: 1629819797810
trace_id: "85ea8a46-d63e-4fe3-ad03-ade7c16cd36b"
span_id: "1012381427123789198737891237891"

Loading