Skip to content

[WEAVE] Fix incomplete auth/routing snippet in OTeL docs (WBDOCS-2035)#2536

Open
dbrian57 wants to merge 1 commit intomainfrom
claude/blissful-shirley-671061
Open

[WEAVE] Fix incomplete auth/routing snippet in OTeL docs (WBDOCS-2035)#2536
dbrian57 wants to merge 1 commit intomainfrom
claude/blissful-shirley-671061

Conversation

@dbrian57
Copy link
Copy Markdown
Contributor

@dbrian57 dbrian57 commented Apr 23, 2026

Summary

  • The Python and TypeScript snippets in the Authentication and routing section were missing span processor registration and provider setup calls — copy-pasting them produced silence (no traces sent)
  • Added missing imports, add_span_processor + trace.set_tracer_provider (Python), spanProcessors constructor option + provider.register() (TypeScript)
  • Added a <Note> callout making it explicit these snippets show configuration only and pointing to the full runnable Examples below

Test plan

  • Verify Python snippet now includes from opentelemetry import trace, from opentelemetry.sdk.trace.export import BatchSpanProcessor, add_span_processor(BatchSpanProcessor(exporter)), and trace.set_tracer_provider(tracer_provider)
  • Verify TypeScript snippet now includes BatchSpanProcessor import, spanProcessors option in provider constructor, and provider.register()
  • Verify <Note> callout appears after the CodeGroup and links to #examples
  • Run the updated Python snippet end-to-end to confirm traces appear in Weave

Related

🤖 Generated with Claude Code

The Python and TypeScript configuration snippets in the "Authentication and routing"
section were missing the span processor wiring and provider registration calls,
meaning users who copy-pasted them would get silence with no traces sent.

Added: missing imports, add_span_processor + set_tracer_provider (Python),
spanProcessors + provider.register() (TypeScript), and a Note callout
directing users to the complete Examples section below.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dbrian57 dbrian57 requested a review from a team as a code owner April 23, 2026 21:35
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 23, 2026

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

Project Status Preview Updated (UTC)
wandb 🟢 Ready View Preview Apr 23, 2026, 9:39 PM

@dbrian57 dbrian57 added the author-docs-plugin Docs PRs authored via Cursor author-docs skill label Apr 23, 2026
@dbrian57
Copy link
Copy Markdown
Contributor Author

dbrian57 commented Apr 23, 2026

Sources and decision log

Source: Slack thread in #weave-support-rotation — Griffin Tarpenning reported that copy-pasting the auth/routing snippet produced no traces. His diagnosis: the snippet created the exporter and tracer_provider but never wired them up.

What was wrong:

  • Python: missing from opentelemetry import trace, from opentelemetry.sdk.trace.export import BatchSpanProcessor, the add_span_processor() call, and trace.set_tracer_provider()
  • TypeScript: missing BatchSpanProcessor import, spanProcessors in the constructor, and provider.register()

Decisions:

  • Kept the snippet scoped to auth/routing config rather than turning it into a full runnable script (the Examples section below already provides complete runnable examples for each instrumentation approach)
  • Added span processor and provider registration calls because these are required for any traces to actually be exported — without them the snippet was silently broken
  • Added a <Note> callout pointing readers to the Examples section for complete runnable code

Intentionally omitted: tracer creation (trace.get_tracer(...)) and application code — these belong in the full examples, not the config overview snippet.

Related JIRA: WBDOCS-2035


Needs SME verification

  • Confirm trace.set_tracer_provider(tracer_provider) is the correct way to register a global tracer provider in this context (vs. passing it explicitly to each instrumentor)
  • Confirm spanProcessors: [new BatchSpanProcessor(exporter)] is equivalent to calling provider.addSpanProcessor() post-construction in the TS SDK version used

Resume prompt

To continue this session: PR is wandb/docs#2536 for JIRA ticket WBDOCS-2035. The fix is in weave/guides/tracking/otel.mdx — the auth/routing section CodeGroup. An SME should verify the two items above before merging.


{
  "skill": "docs",
  "version": "unknown",
  "depends_on": "unknown",
  "model": "claude-sonnet-4-6",
  "note": "versions.json not found in skill directory at time of authoring"
}

@github-actions
Copy link
Copy Markdown
Contributor

📚 Mintlify Preview Links

🔗 View Full Preview

📝 Changed (1 total)

📄 Pages (1)

File Preview
weave/guides/tracking/otel.mdx Otel

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: a3e1330 at 2026-04-23 21:39:39 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🔗 Link Checker Results

All links are valid!

No broken links were detected.

Checked against: https://wb-21fd5541-claude-blissful-shirley-671061.mintlify.app

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

Labels

author-docs-plugin Docs PRs authored via Cursor author-docs skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant