Repository navigation
fix(onboarding): members set up with the public ingest key - #2357
Conversation
… the browser SDK The Browser stack card opened the Next.js server snippet filled with the private key. It now shows MapleBrowser.init with the public key. Every in-app snippet now follows the docs quickstart: the key lives in the environment, not in a source file; Node, Python and Java use their zero-code agents; Go wraps the HTTP handler with otelhttp. Node no longer imports a package it does not install. Java/Kotlin, .NET, Laravel, Ruby, Rust and Deno get their own setup instead of "see opentelemetry.io".
… hitting a dead end An invited teammate joins as a member and could not read either key, so the connect step showed placeholders and "An admin can copy it". GET /v2/ingest_keys/public returns the public key to any member (new ingest_keys:view_public permission). It is made to ship in browser bundles and only sends telemetry, so it adds no exposure. The onboarding connect step and the overview setup card read both keys when they can, and fall back to the public key, with a line saying who can hand out the private one.
…fix/onboarding-snippets
# Conflicts: # apps/web/src/page/overview/setup-checklist-command.ts
…Sources shows the install step The agent prompt carries the key the picked stack uses, so a browser-only stack never hands the private key to an agent writing frontend code.
A key store outage stays a failure, so an admin is never handed the public key and told to ask an engineer for the private one. One shared read serves the connect step and the overview card.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ee the keys Settings, Ingestion shows no key to a member, so the note asks an engineer or admin instead of pointing there. The overview card's member label is covered by a scene test.
This comment has been minimized.
This comment has been minimized.
# Conflicts: # apps/landing/src/content/docs/agent-tracing.mdx # apps/landing/src/content/docs/agent-tracing/microsoft-agent-framework.mdx # apps/landing/src/content/docs/getting-started/quickstart.mdx # apps/landing/src/content/docs/reference/ingest.md
# Conflicts: # apps/web/src/page/settings/ingestion/view.ts
# Conflicts: # apps/web/src/page/overview/setup-checklist-view.ts
This comment has been minimized.
This comment has been minimized.
…-key # Conflicts: # apps/web/src/page/onboarding/quick-start-agent-prompt.scene.test.ts # apps/web/src/page/onboarding/quick-start-connect.ts
Maple review🟢 Confidence 10/10 · safe to merge. Widening a credential read to members is gated by a dedicated permission and pinned by API and web tests. Adds a member-readable
|
Part of the trial onboarding stack:
Why
Invites join as member, and members could read neither ingest key. The teammate most likely to do the setup hit placeholders and "An admin can copy it from Settings, Ingestion" (engineers could, in fact). The overview setup card said "Ask an org admin for your ingest keys".
Decision: members read the public key
GET /v2/ingest_keys/publicreturns{ object, public_key, public_rotated_at }.ingest_keys:view_public, whose minimum role is member.GET /v2/ingest_keys, and rolling stays admin-only.The public key is made to ship in browser bundles. Ingest gives it the same capability as the private key: send telemetry, never read. So handing it to members exposes nothing a visitor to the customer's site can't already see.
What changed
docs/api-v2.md. The API key scope derives toingest_keys:read.retrieveSetupKeys(apps/web/src/data/ingest-keys.ts) reads both keys for an engineer and up, and the public key for a member. Only a permission refusal falls back, whether the session check's tagged error or the API's decodedinsufficient_permissionsenvelope. A key store outage stays a failure, so an admin is never handed the public key.Verification
config-resources.http.test.ts(API over PGlite): a member key gets the public key from/publicand a 403 from/v2/ingest_keys; the public key matches the admin's read.ingest-keys.test.ts(web):openapi.test.ts, policy tests, web and api typecheck, oxlint.🤖 Generated with Claude Code
Summary by CodeRabbit