Skip to content

Conversation

AbhiPrasad
Copy link
Member

resolves https://linear.app/getsentry/issue/LOGS-388/document-vercel-log-drain-attributes-in-conventions

This PR adds a set of attributes to the conventions for attributes that we'll generate in the upcoming vercel log drain endpoint.

These attributes are created when we map the vercel log schema to the sentry schema and attributes as relevant. See this notion doc for details about the schema and the transform: https://www.notion.so/sentry/Vercel-Log-Drain-2808b10e4b5d808c95f3ebcfe2b8828a.

Most attribute keys here align in naming as per https://vercel.com/docs/drains/reference/logs. There are some fields in the vercel log drain schema that don't show up in this PR. These are:

  1. timestamp, which is mapped directly to the log timestamp
  2. level which is mapped directly to the log level
  3. message which is mapped directly to the log body

@AbhiPrasad AbhiPrasad self-assigned this Oct 3, 2025
@linear
Copy link

linear bot commented Oct 3, 2025

@AbhiPrasad AbhiPrasad force-pushed the abhi-vercel-log-drain-endpoint-conventions branch from d36076f to 4a14dad Compare October 3, 2025 16:08
Copy link
Member

@lcian lcian left a comment

Choose a reason for hiding this comment

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

LGTM

@AbhiPrasad AbhiPrasad merged commit d80504a into main Oct 8, 2025
5 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-vercel-log-drain-endpoint-conventions branch October 8, 2025 17:15
github-merge-queue bot pushed a commit to getsentry/relay that referenced this pull request Oct 8, 2025
ref
https://linear.app/getsentry/issue/LOGS-389/add-vercel-log-drain-endpoint-to-relay

This PR updates the `relay-ourlogs` create to add a `VercelLog` struct
and a `vercel_log_to_sentry_log` transform method.
`vercel_log_to_sentry_log` turns an incoming `VercelLog` json payload
structure into an instance of Sentry's `OurLog`.

I haven't hooked up the `vercel_log_to_sentry_log` function to an
endpoint and the rest of the processing pipeline on purpose, I want to
take our time to make sure we are all good with the transform taking
place.

Many of these attributes are new, I've opened a PR in the conventions
repo to document them accordingly:
getsentry/sentry-conventions#163. See this
notion doc for details about the schema and the transform:
https://www.notion.so/sentry/Vercel-Log-Drain-2808b10e4b5d808c95f3ebcfe2b8828a.
The attribute keys here align in naming as per
https://vercel.com/docs/drains/reference/logs.

After this PR merges in, I'll work on exposing this in a new
integrations endpoint, gated behind the feature flag introduced in
#5208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants