docs(DevEx): Add guidelines for metrics, logs, and feature flags#7268
docs(DevEx): Add guidelines for metrics, logs, and feature flags#7268
Conversation
Group metrics, logs, and feature flags as consecutive sections after testing so engineers encounter them when scanning the README. Migrate the Flagsmith on Flagsmith section from the Flagsmith SDK to OpenFeature, and move it up from the bottom of the file. beep boop
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7268 +/- ##
=======================================
Coverage 98.29% 98.29%
=======================================
Files 1357 1357
Lines 50851 50851
=======================================
Hits 49984 49984
Misses 867 867 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Visual Regression16 screenshots compared. See report for details. |
Changes
Contributes to #7012
Expands the
Code guidelinespart ofapi/README.mdso metrics, logs, and feature flags sit as consecutive sections betweentestingandmigrations. The goal is that engineers reach for events, metrics, and flags at planning time, in the same way they already reach for tests.Logs is the substantive addition: structlog conventions (
entity.actionnaming, double-underscore attribute namespacing,logger.bind), a worked example with the resulting OTLP event annotated inline, apytest_structlog/StructuredLogCapturesnippet for tests, and PII guidance. The section briefly names the OpenTelemetry pipeline so readers understand events can also feed a CDP or data warehouse for product analytics.The existing
Flagsmith on Flagsmithsection is migrated from the Flagsmith SDK to OpenFeature (get_openfeature_client(),get_boolean_value(..., evaluation_context=...),Organisation.openfeature_evaluation_context) and moved up from the bottom of the file to sit next to metrics and logs.How did you test this code?
Documentation only. Proofread locally and verified the referenced symbols (
get_openfeature_client,openfeature_evaluation_context,StructuredLogCapture,environments/metrics.py) exist in the current codebase.