Skip to content

feat: add do11y documentation observability - #375

Draft
JakeSCahill wants to merge 3 commits into
mainfrom
feature/add-do11y
Draft

feat: add do11y documentation observability#375
JakeSCahill wants to merge 3 commits into
mainfrom
feature/add-do11y

Conversation

@JakeSCahill

@JakeSCahill JakeSCahill commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Axiom do11y integration for documentation engagement tracking
  • Track page views, scroll depth, code copy events, TOC clicks, AI referral traffic
  • Configuration uses edge function proxy (token stored server-side in Netlify)

Setup Required

After merging, set these environment variables in Netlify:

  • AXIOM_DO11Y_TOKEN - Axiom API ingest token
  • AXIOM_DO11Y_DATASET - Dataset name (defaults to redpanda-docs-analytics)

Related PR

Test plan

  • Build UI bundle locally
  • Verify do11y.js loads on pages
  • Verify events are sent to /api/do11y endpoint
  • Verify no API token in client-side code

🤖 Generated with Claude Code

JakeSCahill and others added 2 commits April 21, 2026 16:08
Prevents workflow hangs when steps intermittently freeze:
- Lint Go code: 10-minute timeout (normal: 3 seconds)
- Bundle UI: 15-minute timeout (normal: 5.5 minutes)

Recent pattern: 11 of 30 runs cancelled after 64+ minute hangs.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add Axiom do11y integration for tracking documentation engagement:
- Page views and scroll depth
- Code block copy events
- TOC clicks and navigation
- AI referral traffic detection

The configuration uses a Netlify edge function proxy to keep
the Axiom API token server-side. Requires AXIOM_DO11Y_TOKEN
environment variable to be set in Netlify.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Apr 22, 2026

Copy link
Copy Markdown

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit 538194d
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a7836da6834390008233723
😎 Deploy Preview https://deploy-preview-375--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 27 (🔴 down 3 from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (no change from production)
SEO: 89 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 933d12e4-5d84-4be1-812b-9f094679c93f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-do11y

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Resolve validate-build.yml conflict in favour of main's restructured
Bundle UI step: main moved 'npm ci' into a cached 'Install dependencies'
step and set timeout-minutes: 10 on 'gulp bundle', which supersedes this
branch's timeout-minutes: 15 on the combined step. Both intents (a step
timeout, and npm ci before bundling) are preserved.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JakeSCahill

Copy link
Copy Markdown
Contributor Author

Conflicts resolved and the branch is MERGEABLE with build green — but keeping this in draft, because the tracking provably cannot send anything as configured.

The body describes an "edge function proxy (token stored server-side in Netlify)". The vendored client does not support that shape:

  1. URL construction. src/js/vendor/do11y.min.js (@axiomhq/do11y v0.0.5) builds its ingest URL as 'https://' + axiomHost + '/v1/ingest/' + dataset. With axiomHost: '/api/do11y' that yields https://api/do11y/v1/ingest/... — not a relative path to the edge function.
  2. The send gate never opens. The library requires axiomToken to be set and at least 10 characters, and axiomHost to be in a hardcoded allowlist (us-east-1.aws.edge.axiom.co, eu-central-1.aws.edge.axiom.co). A proxy path satisfies neither, so it drops events before any request.
  3. Not a version problem. I checked the published @axiomhq/do11y@0.0.6 (latest; the vendored copy is 0.0.5): same hardcoded allowlist, same URL construction, no relative-host support.

Two other prerequisites, unchanged: the edge function itself (redpanda-data/docs-site#167, which provides /api/do11y) is still open and a draft, so the endpoint does not exist in production; and AXIOM_DO11Y_TOKEN / AXIOM_DO11Y_DATASET must be set in Netlify — necessary but not sufficient given the above.

To make this shippable, pick one: send directly to an allowlisted Axiom host with a token that is public by design (accepting a client-visible ingest token), or keep the proxy and replace the vendored client with one that supports a relative ingest URL — patched fork or a small custom sender.

Nothing here is wasted: the event instrumentation (page views, scroll depth, code copy, TOC clicks, AI referrals) is independent of the transport decision.

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.

1 participant