Skip to content

docs(inspector): inspect a Segment gateway - #1745

Draft
aleks-tpom6oh wants to merge 2 commits into
mainfrom
docs/segment-gateway-inspector
Draft

aleks-tpom6oh wants to merge 2 commits into
mainfrom
docs/segment-gateway-inspector

Conversation

@aleks-tpom6oh

@aleks-tpom6oh aleks-tpom6oh commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

A new guide, Inspect a Segment gateway (pages/inspector/connect-inspector-to-segment-gateway.mdx), for Segment workspaces modelled as a gateway in Avo.

  • How it works. The page explains the two kinds of checkpoint:
    • The gateway checkpoint is the "Avo Inspector v2" destination. It sees each track event as Segment receives it, after source-scoped Protocols Transformations.
    • Each output's checkpoint is an Avo-generated Destination Insert Function on that output's destination. It runs after the destination's filters, its destination-scoped transformations and its mapping triggers, and before its field mappings.
    • Only track events are inspected; every other event type passes through.
  • Setup steps:
    1. Find the gateway under Sources → Gateways and open its Inspector setup tab.
    2. Add the destination with Gateway Support on, choose Inspected Fields, and leave Output Reference empty on the gateway mapping.
    3. Add one Insert Function per output. The tab's Environment selector defaults to Production, and its Inspect choice should match the destination's Inspected Fields.
    4. Optionally set the origin hint: map hint values under each source's Origin hints, set the destination's mapping fields, and add the Avo Origin Hint function setting.
    5. The origin app version defaults to the event's own version: on the destination, App Version Property, then the App Version field; in the Insert Function, context.app.version. Web sources set App Version Property on the destination and edit getOriginAppVersion in the Insert Function. With an origin hint, an event with no version anywhere is recorded without one.
  • Caveats customers need:
    • A destination takes one insert function, so any existing code moves into applyYourInsertFunction.
    • Throw EventNotSupported for event types an old function left out.
    • Storage destinations can't take an insert function.
    • The function waits up to one second per track event, and Segment bills execution time.
    • Outputs without a reference send nothing.
    • A Public Encryption Key on the gateway destination sends encrypted values in development and staging.
  • What Inspector inspects:
    • The three choices: Event properties, Event properties and context, and Everything.
    • The warehouse-style column naming.
    • Only names and types are sent.
    • A warning that context and envelope fields show up as properties that aren't in the plan.

It also adds a nav entry under the Inspector integrations. On the existing Segment integration page, it adds a callout pointing gateway users to the new guide and a Gateway Support setting that tells regular-source users to turn it off.

Product knowledge: no product area touched (docs only).

Draft until the code ships

Merge this after these ship:

  • avohq/monorepo#10121: Segment and RudderStack gateway setup in the gateway's Inspector setup tab.
  • avohq/monorepo#10137: the Segment output Insert Functions and the Inspect choice.
  • feat(avo-v2): send to Inspector v2 with optional gateway coordinates segmentio/action-destinations#4053: Gateway Support, the gateway mapping fields and Inspected Fields on the "Avo Inspector v2" destination. Until it ships, the guide tells customers who don't see Gateway Support that the update hasn't reached their workspace, matching the Setup tab's own note.

Gateways are behind the Gateways workspace flag, so the guide opens with the usual beta callout ("Reach out at support@avo.app to get access").

Deliberately out of scope

  • A general gateway concept page and a RudderStack gateway guide. The guide explains gateways, inputs, outputs and checkpoints in a short section of its own.
  • Screenshots. The page is text-only because the flows aren't live yet; screenshots can follow once they are.
  • The app's Setup tab still links its "Learn more" to the generic Inspector quickstart. Repointing it to this page belongs in the app once this page is published.

How to test this PR:

  1. Open the preview and read Inspector → Inspector Segment gateway integration. Check the links: the Segment integration page and its property value validation anchor, the Events view, Issues, Alerts, and the in-page #what-inspector-inspects anchor.
  2. On Inspector Segment integration, check the new gateway callout and the Gateway Support setting.

Checks run:

  • yarn spellcheck: 167 pages, 0 issues.
  • Both changed pages compile as MDX with remark-gfm.
  • yarn build failed locally on a type error in pages/_app.tsx (publicEncryptionKey is not on the Avo Inspector init type). This PR doesn't touch that file. The local node_modules came from an older checkout, so the CI preview build is the real check.
  • An independent fact-check against the app code, the generated function and the Segment destination found 1 HIGH issue (where Gateways live in the app), 8 MEDIUM and 6 LOW. All were fixed except two LOW notes that were checked and kept:
    • The Protocols Transformations ordering was verified live in a Segment workspace.
    • Function execution billing is from Segment's Functions usage docs.

🤖 Generated with Claude Code

New guide for Segment workspaces modelled as a gateway: the Avo Inspector v2
destination as the gateway checkpoint, an Avo-generated Destination Insert
Function per output, the origin hint, and what Inspector inspects (event
properties, context, or everything a warehouse stores). The Segment
integration page links to it and now tells regular-source users to turn
Gateway Support off.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 1, 2026 6:42pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@logason

logason commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 31d07c82 Deployed Oct 1, 2026 by vercel[bot]
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