Skip to content

docs(TSP-1371): add credit consumption tracking to OTEL streaming docs - #745

Open
claude[bot] wants to merge 1 commit into
mainfrom
docs/TSP-1371
Open

docs(TSP-1371): add credit consumption tracking to OTEL streaming docs#745
claude[bot] wants to merge 1 commit into
mainfrom
docs/TSP-1371

Conversation

@claude

@claude claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • Adds a new Credit consumption tracking (Enterprise feature) section to enterprise/streaming-events.mdx
  • Documents the relevance_ai.billing.credits_used attribute on invoke_agent spans, including where it surfaces, credit rollup behavior for sub-agent calls, and a prominent warning about double-counting
  • Adds the attribute to the invoke_agent span attributes table with a cross-link to the new section

Linear issue

https://linear.app/relevance/issue/TSP-1371/

🤖 Generated with Claude Code

Documents the new `relevance_ai.billing.credits_used` attribute on invoke_agent spans,
including credit rollup behavior and a double-counting warning for customers building
credit dashboards from OTEL data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude claude Bot added the docs-drafter Documentation drafted by Claude label Aug 5, 2026
@mintlify

mintlify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
relevanceai 🟢 Ready View Preview Aug 5, 2026, 4:08 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@linear

linear Bot commented Aug 5, 2026

Copy link
Copy Markdown

TSP-1371

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🎯 Vibe check

Reviewed: 1 file (1 with issues, 0 clean)

Scores

Dimension Score What's holding it back
🟡 Consistency 7/10 Product terms (Agent, Workforce, Tool) left lowercase in ~8 places; page title and one section heading not in sentence case
🟡 Technical clarity 8/10 score_threshold configuration field has no documented default value; the IAM role ARN placeholder requires Relevance to supply the value before setup can complete — worth surfacing earlier than step 2
🟢 Non-technical clarity 9/10 OTEL defined up front, "scrub before delivery" analogy works well, PII acronym expanded on first use
🟡 Structure 8/10 CardGroup used for a flat technical label list with no descriptions; one <Warning> wraps informational content; duplicate ### Where it surfaces headings across two subsections

Score key: 🟢 9–10, 🟡 6–8, 🔴 1–5. Scores are a single overall judgment about the whole PR — not per file. The dropdowns below contain the line-by-line specifics.

Overall vibe: Solid technical reference page — the setup steps are precise, the breaking-change callouts are well placed, and the credit rollup gotcha is documented exactly where a reader needs it. The main friction is systematic: product terms (Agent, Workforce) aren't consistently capitalized, the page title needs sentence case, and one component choice (CardGroup for entity type labels) works against the reader rather than for them.

🔧 Issues (10)
  • enterprise/streaming-events.mdx:2–3 — Title "Event Streaming for Observability (OpenTelemetry)" and sidebarTitle "Event Streaming (OpenTelemetry)" → sentence case: "Event streaming for observability (OpenTelemetry)" and "Event streaming (OpenTelemetry)"

  • enterprise/streaming-events.mdx:88 — Heading ## PII Redaction (Enterprise feature)## PII redaction (Enterprise feature) ("Redaction" is not a proper noun)

  • enterprise/streaming-events.mdx:16 — "agent invocations" and "workforce executions" → "Agent invocations" and "Workforce executions" (these are Relevance AI product features)

  • enterprise/streaming-events.mdx:92 — "live agent conversations" → "Agent conversations" (refers to the Relevance AI Agent product feature)

  • enterprise/streaming-events.mdx:113–114 — "what you send to an agent/tool" / "what the agent responds" → "Agent/Tool" / "Agent" (product features)

  • enterprise/streaming-events.mdx:168 — "the agent's execution trace" → "the Agent's execution trace"

  • enterprise/streaming-events.mdx:192 — "the entire agent execution tree" → "the entire Agent execution tree"

  • enterprise/streaming-events.mdx:209 — "Traces track execution flows for agents, workforces, and LLM completions." → "Agents, Workforces"

  • enterprise/streaming-events.mdx:419 — Same sentence repeated verbatim; same fix: "Agents, Workforces"

  • enterprise/streaming-events.mdx:501 — "Records a complete agent conversation/invocation." → "Agent conversation/invocation"

🧩 Component suggestions (3)
  • enterprise/streaming-events.mdx:120–131<CardGroup cols={3}> lists 10 PII entity type labels (EMAIL_ADDRESS, PHONE_NUMBER, etc.) with icons but no descriptions. These are a flat technical reference list, not parallel navigable choices — a plain bulleted list is cleaner. Alternatively, add a second column to the existing Redaction actions table with an "Entity" column, or just use a single-column bulleted list under the heading.

  • enterprise/streaming-events.mdx:162<Warning> wraps "There is currently no self-serve UI to toggle PII redaction…" — no risk, no irreversible action here. This is informational. Swap to <Note>.

  • enterprise/streaming-events.mdx:154–160 — The score_threshold row in the Configuration table has no documented default value. Add a "Default" column to this table (or note the default in the description cell) so readers know what they're overriding. The action field could also list its default ("replace") here rather than only in the Redaction actions table above.

🏗️ Page structure (1)
  • enterprise/streaming-events.mdx:175 and :195 — Both the Prompt injection detection and Credit consumption tracking subsections use ### Where it surfaces as a heading. Duplicate heading text makes anchor links ambiguous and is harder to scan. Rename to something like ### Where prompt injection results surface and ### Where credit usage appears.
⚠️ Contradictions (0)

No contradictions found. The 30-day staging bucket purge described in streaming-events.mdx:28 is consistent with data-retention.mdx:312–313. The note that event streaming data is independent of the Data Retention policy is consistent across both pages.

🔋 Credit usage
Item Count
Files reviewed 1
Context pages read 2
Total lines processed ~1,172

Files read: enterprise/streaming-events.mdx (617 lines), enterprise/data-retention.mdx (389 lines), enterprise/analytics.mdx (166 lines)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-drafter Documentation drafted by Claude

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant