Skip to content

feat(OTel): Add backend event catalogue#7286

Draft
khvn26 wants to merge 1 commit intomainfrom
feat/otel-events-catalogue
Draft

feat(OTel): Add backend event catalogue#7286
khvn26 wants to merge 1 commit intomainfrom
feat/otel-events-catalogue

Conversation

@khvn26
Copy link
Copy Markdown
Member

@khvn26 khvn26 commented Apr 17, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to Flagsmith/flagsmith-common#201. Depends on Flagsmith/flagsmith-common#202.

Adds a checked-in markdown catalogue of every structured event the backend emits, generated from the source on each pre-commit run. Product and ops can use it to curate the OTel allowlist without grepping the codebase, and any PR that adds, renames, or changes an emit will surface the diff in review — so event-level changes stop being invisible.

flagsmith docgen events, shipped in the linked flagsmith-common PR, writes to docs/docs/administration-and-security/platform-configuration/events.md. The existing pre-commit hook that runs make -C api generate-docs now keeps this file in sync alongside the metrics doc.

Follow-ups, not in this PR: CODEOWNERS wiring so the catalogue page auto-requests a named stakeholder on changes, and GitHub-linked source locations.

This PR is draft because it points flagsmith-common at the PR branch for smoke testing. Before merging, flagsmith-common has to release a new version and this PR has to switch to it.

How did you test this code?

Ran make -C api generate-docs locally against the feat branch of flagsmith-common. The resulting events.md captures every domain called out in the linked issue — code_references, workflows, launch_darkly, feature_health, sentry_change_tracking — plus emits from app_analytics, dynamodb, gitlab, platform_hub, and segments.

Review the generated events.md for anything that reads oddly or is missing a known emit.

Generates `docs/.../events.md` via `flagsmith docgen events` — the
new subcommand shipped in Flagsmith/flagsmith-common#202. The
catalogue lists every structured event the backend emits, the log
level each is emitted at, its source locations, and the attributes
it carries, so product and ops can curate the OTel allowlist without
grepping the codebase.

Wired into `make generate-docs` so the catalogue stays in sync with
the source on the existing pre-commit hook — any PR that adds or
changes an emit surfaces the diff in review.

Points `flagsmith-common` at the PR branch for smoke testing; switch
to a released version before merging.

beep boop
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
docs Error Error Apr 17, 2026 11:00pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ignored Ignored Apr 17, 2026 11:00pm
flagsmith-frontend-staging Ignored Ignored Apr 17, 2026 11:00pm

Request Review

@github-actions github-actions bot added api Issue related to the REST API docs Documentation updates feature New feature or request and removed docs Documentation updates labels Apr 17, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.37%. Comparing base (1b8145a) to head (fbbe920).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7286   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files        1364     1364           
  Lines       51071    51071           
=======================================
  Hits        50239    50239           
  Misses        832      832           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant