Skip to content

feat(landing): Python logging levels guide - #1574

Open
JeremyFunk wants to merge 6 commits into
mainfrom
feat/guide-python-logging-levels
Open

JeremyFunk wants to merge 6 commits into
mainfrom
feat/guide-python-logging-levels

Conversation

@JeremyFunk

@JeremyFunk JeremyFunk commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Adds /guides/python-logging-levels, a beginner-first explainer and how-to for the levels in Python's standard logging module.

Covers

  • Basics: what a log level is, the five levels (DEBUG, INFO, WARNING, ERROR, CRITICAL) with a plain sentence and an example call each, setting the level with basicConfig and setLevel, why log.info() prints nothing by default (WARNING), and a question list for choosing a level. Levels use the named constants only, no numeric values.
  • Setting the level from a --log-level flag or a LOG_LEVEL variable (tabs), the basicConfig runs-once callout (one sentence plus the setLevel fix), and quieting noisy libraries with per-logger levels.
  • One short section on logger vs handler levels (terminal at WARNING, file at DEBUG).
  • OpenTelemetry, self-contained: what you get (Python logs with their level sent to any OTLP backend), the install command, a complete logs-only telemetry.py (endpoint, auth header, service name, a terminal handler for every level and a LoggingHandler at INFO on the root logger), how to run it with real output, and what you see on Maple's Logs page (two screenshots). Maple is the example backend; a local OpenTelemetry Collector endpoint is given as the alternative.
  • Four common mistakes and an FAQ.

Level colors use the --severity-* tokens that Maple's Logs page uses, in the badges, tables and code. Every code block has a copy button (bindCopyButtons from src/lib/copy-to-clipboard.ts, as in the Loguru guide); output blocks don't.

Shared code (additive)

  • LanguageTabs takes an optional group storage key, so this page's tabs don't overwrite the language a reader picked elsewhere on the site.
  • guide-highlight.ts: a console mode for terminal sessions and more Python keywords.

Also fixes content/docs/guides/instrumentation-python.md. Once telemetry.py has attached its handler, basicConfig(level=...) does nothing, so the docs now say to call logging.getLogger().setLevel(...) and link to this guide.

Search intent: what the Python logging levels are, the default level, and how to set the level in code, from the command line or from an environment variable.

Maple docs linked: /docs/explore/logs, and /docs/guides/instrumentation-python from the closing card only (for traces and metrics).

Verification: every Python snippet on the page was run on Python 3.14.5 and the sample outputs are from those runs. The telemetry.py and app.py pair was run with opentelemetry-sdk 1.45.1, opentelemetry-exporter-otlp-proto-http 1.45.1 and opentelemetry-instrumentation-logging 0.66b1 against a local OTLP/HTTP receiver: the terminal shows all three lines, the receiver gets the INFO and WARNING records with the service name and auth header, and without the urllib3 line the exporter's DEBUG request logs print. bun run --cwd apps/landing build passes; the page was reviewed in Playwright at desktop and mobile widths.

Sources: Python docs (logging, Logging HOWTO), the OTLP specification and PyPI opentelemetry-instrumentation-logging.

Summary by CodeRabbit

  • New Features

    • Added a comprehensive guide explaining Python logging levels, configuration, filtering, and OpenTelemetry integration.
    • Added the Python logging guide to the guides index and generated guide listing.
    • Improved code examples with Python keyword and console-session syntax highlighting.
    • Language tabs can now use custom grouping keys.
  • Documentation

    • Clarified how to configure the root logger when using telemetry handlers.

@maple-review-bot

maple-review-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 8/10 · likely safe to merge
Held at 8 because a warning is open.
1 warning −1 · tests not needed · risk low

Adds an English landing guide on Python logging levels, wires it into the guides index and llms.txt, and corrects the Python instrumentation doc's level advice. Safe to merge once the sibling Loguru page it links to exists.

  • New /guides/python-logging-levels page, listed in the guides index and llms.txt
  • instrumentation-python.md now recommends logging.getLogger().setLevel() over basicConfig

Before merge

Findings

🟠 Warning · F1 · Link to /guides/loguru has no page in this repository

correctness · apps/landing/src/pages/guides/python-logging-levels.astro:541

/guides/loguru resolves to no page: apps/landing/src/pages/guides/ holds only api-latency, index, python-logging-levels, uptime-monitoring, what-is-apdex and what-is-apm, on this head and on main. Every other internal guide link points at an existing page, so this one sends readers to the 404 page unless the parallel Loguru PR lands first.

Hold this sentence until `apps/landing/src/pages/guides/loguru.astro` exists, or point it at `/docs/guides/instrumentation-python#logging` until then.
🤖 Prompt to fix this finding with an AI agent
Findings from an automated review of commit 9d570a883754e6a69d4174beef94a17e7f9fada5. Verify each one against the current code before changing anything, fix only those that still apply, and keep each fix to the lines it names.

---

F1 · Warning · correctness · apps/landing/src/pages/guides/python-logging-levels.astro:541
Link to `/guides/loguru` has no page in this repository
`/guides/loguru` resolves to no page: `apps/landing/src/pages/guides/` holds only api-latency, index, python-logging-levels, uptime-monitoring, what-is-apdex and what-is-apm, on this head and on `main`. Every other internal guide link points at an existing page, so this one sends readers to the 404 page unless the parallel Loguru PR lands first.
Suggested fix: Hold this sentence until `apps/landing/src/pages/guides/loguru.astro` exists, or point it at `/docs/guides/instrumentation-python#logging` until then.
What was checked
  • Level semantics, lastResort, basicConfig no-op, propagation and dictConfig claims read against the samples and instrumentation-python.md:77
  • WARN/FATAL severity claim matches STANDARD_SEVERITIES in packages/domain/src/setup-audit.ts:949
  • TableOfContents props, JSON-LD, published date and every /docs/* target verified at the head SHA

9d570a8 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 inline note from Maple's review. The score and summary are in the review comment above.

<p class="guide-kicker">Python logs in Maple</p>
<h3>Search by severity, then jump to the trace</h3>
<p>
Once the handler is attached, the Logs page charts volume by severity, filters by service and environment, and opens the trace behind any line logged inside a span. Using Loguru instead? See the <a href="/guides/loguru">Loguru guide</a>.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Link to /guides/loguru has no page in this repository

F1 · Warning · correctness

/guides/loguru resolves to no page: apps/landing/src/pages/guides/ holds only api-latency, index, python-logging-levels, uptime-monitoring, what-is-apdex and what-is-apm, on this head and on main. Every other internal guide link points at an existing page, so this one sends readers to the 404 page unless the parallel Loguru PR lands first.

Hold this sentence until `apps/landing/src/pages/guides/loguru.astro` exists, or point it at `/docs/guides/instrumentation-python#logging` until then.
🤖 Prompt to fix with an AI agent
In `apps/landing/src/pages/guides/python-logging-levels.astro:541`: Link to `/guides/loguru` has no page in this repository.

`/guides/loguru` resolves to no page: `apps/landing/src/pages/guides/` holds only api-latency, index, python-logging-levels, uptime-monitoring, what-is-apdex and what-is-apm, on this head and on `main`. Every other internal guide link points at an existing page, so this one sends readers to the 404 page unless the parallel Loguru PR lands first.

Suggested fix: Hold this sentence until `apps/landing/src/pages/guides/loguru.astro` exists, or point it at `/docs/guides/instrumentation-python#logging` until then.

Verify the problem exists at that location before changing it, and keep the fix to those lines.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional: /guides/loguru is being added in a parallel PR. Merge that one first (or together) so the link resolves.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

console.setFormatter(logging.Formatter("%(levelname)-8s %(name)s: %(message)s"))
root.addHandler(console)

root.addHandler(LoggingHandler(level=logging.INFO, logger_provider=logger_provider))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Debug logs leak and exports duplicate

When added after the Python telemetry setup, otelCode exports DEBUG records to Maple and exports INFO records twice. The existing root LoggingHandler remains at NOTSET alongside the new INFO-only handler.

Learn more

The Python instrumentation setup already attaches a LoggingHandler to the root logger at NOTSET in telemetry.py. This example is labeled as code to run after that setup creates logger_provider. Raising the root logger to DEBUG lets its existing handler receive DEBUG records. Appending a second handler at INFO leaves the first intact, so INFO and higher records go to Maple twice.

Example: After importing telemetry, run this snippet and emit log.debug("cart has 3 items") followed by log.info("order 1042 placed"). Maple receives one DEBUG record and two INFO records instead of zero DEBUG and one INFO.

Recommended fix: Replace or reconfigure the existing telemetry LoggingHandler rather than appending another one. For example, keep a reference to the existing handler in telemetry.py and set its level to INFO before raising the root level, then add only the console handler.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: the snippet now replaces the line in telemetry.py that adds the LoggingHandler, so the root logger has a single OpenTelemetry handler at INFO.

@maple-review-bot

maple-review-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 8/10 · likely safe to merge
Held at 8 because a warning is open.
1 warning −1 · tests not needed · risk low

Adds a /guides/python-logging-levels landing page, lists it on /guides and in llms.txt, and corrects the Python instrumentation guide's basicConfig advice. Content and snippets check out; only the still-broken loguru link blocks it.

  • New /guides/python-logging-levels page with nine sections and a FAQ
  • telemetry.py snippet sets the root level and one OTel handler
  • Guide listed on /guides (Field notes) and in llms.txt
  • instrumentation-python.md now uses getLogger().setLevel()

Before merge

Still open from earlier reviews

What was checked
  • otelCode replaces instrumentation-python.md:77, the guide's only root-handler line, so no second OTel handler remains
  • All nine toc slugs match a section id on the page
  • /docs/guides/instrumentation-python and /docs/explore/logs both resolve to content docs

275d763 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c085f9e1-d3e6-4a20-98eb-c9d3d5133a7f
📥 Commits

Reviewing files that changed from the base of the PR and between 87bd710 and 7b8c601.

📒 Files selected for processing: 8
  • apps/landing/public/screenshots/guides/python-logging-levels-01-severity-filter.webp
  • apps/landing/public/screenshots/guides/python-logging-levels-02-log-detail.webp
  • apps/landing/src/components/docs/LanguageTabs.astro
  • apps/landing/src/content/docs/guides/instrumentation-python.md
  • apps/landing/src/lib/guide-highlight.ts
  • apps/landing/src/pages/guides/index.astro
  • apps/landing/src/pages/guides/python-logging-levels.astro
  • apps/landing/src/pages/llms.txt.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7716e62d-b196-44b8-af07-4be86617f4d8
📥 Commits

Reviewing files that changed from the base of the PR and between e71f8b9 and 87bd710.

📒 Files selected for processing: 8
  • apps/landing/public/screenshots/guides/python-logging-levels-01-severity-filter.webp
  • apps/landing/public/screenshots/guides/python-logging-levels-02-log-detail.webp
  • apps/landing/src/components/docs/LanguageTabs.astro
  • apps/landing/src/content/docs/guides/instrumentation-python.md
  • apps/landing/src/lib/guide-highlight.ts
  • apps/landing/src/pages/guides/index.astro
  • apps/landing/src/pages/guides/python-logging-levels.astro
  • apps/landing/src/pages/llms.txt.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

📝 Walkthrough

Adds a Python logging levels guide with code examples, OpenTelemetry and Maple guidance, and guide listings. Updates Python and console syntax highlighting, clarifies root logger configuration in the instrumentation guide, and adds configurable language tab groups.

Changes: Python Logging Guide

Layer / File(s) Summary
Guide code highlighting
apps/landing/src/lib/guide-highlight.ts
Adds console-session highlighting and recognizes additional Python keywords.
Logging concepts and configuration
apps/landing/src/pages/guides/python-logging-levels.astro, apps/landing/src/content/docs/guides/instrumentation-python.md
Adds the guide’s page structure, logging concepts, and configuration examples. Updates the instrumentation guidance to set the root logger level explicitly.
OpenTelemetry integration and presentation
apps/landing/src/pages/guides/python-logging-levels.astro
Adds OpenTelemetry and Maple guidance, common mistakes, FAQs, and responsive styles.
Guide listings
apps/landing/src/pages/guides/index.astro, apps/landing/src/pages/llms.txt.ts
Adds the Python logging guide to the guides index and generated Guides listing.

Language Tab Groups

Layer / File(s) Summary
Configurable tab-group key
apps/landing/src/components/docs/LanguageTabs.astro
Adds an optional group prop, defaults it to maple-docs-language, and uses it for the root data-lang-tabs attribute.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Suggested reviewers: makisuo

Merge Risk: ⚪ Minimal · up to 87bd7

This adds a documentation guide and small supporting component changes. The only caveat is that the /guides/loguru link should land together with, or after, its parallel PR; otherwise it will lead to a 404.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: adding a Python logging levels guide to the landing site.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (4 skipped: 4 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@JeremyFunk
JeremyFunk force-pushed the feat/guide-python-logging-levels branch from 275d763 to ee07df5 Compare October 20, 2026 16:38
@maple-review-bot

maple-review-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 8/10 · likely safe to merge
One confirmed defect: the new guide's two figures point at screenshots that are not in the repository.
2 warnings −2 · tests not needed · risk low

Adds a /guides/python-logging-levels page plus a console highlighter, a group prop on LanguageTabs, and index/llms entries. The reworked OpenTelemetry snippet no longer duplicates the root handler; the two embedded screenshots are missing.

  • New python-logging-levels guide page with levels table, filtering diagram and severity mapping
  • guide-highlight.ts gains a console language for terminal sessions
  • LanguageTabs takes a group storage key so non-language tab groups remember their own pick
  • instrumentation-python.md now sets the level with getLogger().setLevel()

Before merge

Findings

🟠 Warning · F2 · Guide embeds two screenshots that do not exist in public/

correctness · apps/landing/src/pages/guides/python-logging-levels.astro:602-607

/screenshots/guides/python-logging-levels-01-severity-filter.webp (and -02-log-detail.webp at line 607) resolve to nothing: apps/landing/public/screenshots/guides/ holds only the three prometheus-metrics-* files, and no image is added by this PR. The "Filter by severity in Maple" steps render two broken images.

Add `python-logging-levels-01-severity-filter.webp` and `python-logging-levels-02-log-detail.webp` to `apps/landing/public/screenshots/guides/` in this PR, or drop the two `<figure>` blocks until the images land.
🤖 Prompt to fix this finding with an AI agent
Findings from an automated review of commit ee07df533a6a5e214c70b6e551898686a78bf6b5. Verify each one against the current code before changing anything, fix only those that still apply, and keep each fix to the lines it names.

---

F2 · Warning · correctness · apps/landing/src/pages/guides/python-logging-levels.astro:602-607
Guide embeds two screenshots that do not exist in `public/`
`/screenshots/guides/python-logging-levels-01-severity-filter.webp` (and `-02-log-detail.webp` at line 607) resolve to nothing: `apps/landing/public/screenshots/guides/` holds only the three `prometheus-metrics-*` files, and no image is added by this PR. The "Filter by severity in Maple" steps render two broken images.
Suggested fix: Add `python-logging-levels-01-severity-filter.webp` and `python-logging-levels-02-log-detail.webp` to `apps/landing/public/screenshots/guides/` in this PR, or drop the two `<figure>` blocks until the images land.

Still open from earlier reviews

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/landing/src/pages/guides/python-logging-levels.astro 105k maple 105k/day, 91.1% err
Ingest cost of new log lines
  • apps/landing/src/pages/guides/python-logging-levels.astro:91: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:102: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:121: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:122: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:145: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:146: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:236: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:484: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:567: If this logs once per call, about 853 MB/month: the file's operations run 105k times a day.
What was checked
  • otelCode replaces the root LoggingHandler line and telemetry.py has no console handler, so no duplicate output
  • consoleSession regex only splits $ -prefixed lines and escapes each part; no markup reaches set:html unescaped
  • Every toc slug and sectionNav anchor matches a heading id in the page

ee07df5 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 inline note from Maple's review. The score and summary are in the review comment above.

Comment thread apps/landing/src/pages/guides/python-logging-levels.astro Outdated
@maple-review-bot

maple-review-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 8/10 · likely safe to merge
Screenshots now resolve with matching intrinsic dimensions; only the outstanding /guides/loguru link to a page this repo lacks remains.
2 warnings −2 · tests not needed · risk low

Adds the two referenced Logs-page screenshots and corrects their alt text and intrinsic dimensions. The screenshot gap is fixed; the guide still links to /guides/loguru, which no page in this repository serves.

  • Two python-logging-levels-*.webp screenshots added under public/screenshots/guides/
  • img width/height and alt text updated to match the captured images

Before merge

Still open from earlier reviews

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/landing/src/pages/guides/python-logging-levels.astro 98k maple 98k/day, 90.4% err
Ingest cost of new log lines
  • apps/landing/src/pages/guides/python-logging-levels.astro:91: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:102: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:121: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:122: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:145: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:146: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:236: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:484: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:567: If this logs once per call, about 798 MB/month: the file's operations run 98k times a day.
What was checked
  • Both webp files exist at head and are 2362x1330 and 1342x1086, matching the img attributes (python-logging-levels.astro:602, :607)
  • --severity-fatal/--severity-debug and the other level colors are defined in packages/ui/src/styles/tokens.css:85-91
  • Guide links to /docs/guides/instrumentation-python and /docs/explore/logs resolve under apps/landing/src/content/docs/

87bd710 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

Covers the standard levels, logger vs handler levels and propagation, setting the level from argparse, LOG_LEVEL and dictConfig, per-module levels, custom levels and getLevelNamesMapping, and how levels interact with the OpenTelemetry LoggingHandler. Fixes the Python instrumentation doc, which suggested basicConfig after the handler is attached, where it is a no-op.
Short H1, five grouped sections, a diagram of how a record passes the
logger level, propagates and meets each handler's level, level colors
shared with Maple's severity palette, and highlighted code throughout.
The ways to set the level sit in tabs; the OpenTelemetry section uses the
LoggingHandler from opentelemetry-instrumentation-logging.

LanguageTabs takes an optional storage group so non-language tabs don't
overwrite the remembered language. The guide highlighter gains a console
mode and more Python keywords.
Lead with what a level is, the five levels with an example each and how
basicConfig sets one. Drop the numeric values, dictConfig, the -v flag,
runtime switching and the propagation diagram; keep handler levels as one
short section before OpenTelemetry.
@JeremyFunk
JeremyFunk force-pushed the feat/guide-python-logging-levels branch from 87bd710 to 16961c2 Compare October 22, 2026 18:44
@maple-review-bot

maple-review-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 8/10 · likely safe to merge
Held at 8 because a warning is open.
1 warning −1 · tests not needed · risk low

Adds the Python logging levels guide and its two screenshots, lists it in the guides index and llms.txt, and corrects the Python instrumentation doc's basicConfig advice. Content and markup check out; the only open defect is the link to the not-yet-merged /guides/loguru page.

  • python-logging-levels-01-severity-filter.webp and -02-log-detail.webp ship under public/screenshots/guides/
  • /guides/python-logging-levels listed in investigationGuides and in llms.txt.ts
  • Guide uses LanguageTabs group key maple-guide-log-level-source

Before merge

Still open from earlier reviews

Fixed since the last review

  • ✅ F2 · Guide embeds two screenshots that do not exist in public/

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/landing/src/pages/guides/python-logging-levels.astro 56k maple 56k/day, 82.6% err
Ingest cost of new log lines
  • apps/landing/src/pages/guides/python-logging-levels.astro:41: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:42: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:44: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:66: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:67: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:90: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:91: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:105: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:106: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:131: If this logs once per call, about 454 MB/month: the file's operations run 56k times a day.
What was checked
  • Both webp files exist at head and their real dimensions (2362×1330, 1342×1086) match the width/height in the markup
  • --severity-* tokens used by the badges resolve from packages/ui/src/styles/tokens.css
  • docs-tabs.ts uses each root's data-lang-tabs value as its localStorage key, so the new group prop really isolates the pick

16961c2 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

…ng levels guide

The OpenTelemetry section now installs, configures and runs a complete
logs-only telemetry.py for any OTLP backend, with Maple as the example.
Drop the severity mapping, shorten the basicConfig callout and add copy
buttons to every code block.
@maple-review-bot

maple-review-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 8/10 · likely safe to merge
Held at 8 because a warning is open.
1 warning −1 · tests not needed · risk low

Adds a self-contained Python logging-levels guide page, with a language-tab storage group and a console highlighter so the snippets don't fight other pages' remembered language. Mergeable once the /guides/loguru link resolves; nothing else in the reworked OpenTelemetry section breaks.

  • telemetry.py snippet sets a LoggingHandler at INFO on the root logger, so DEBUG stays terminal-only
  • LanguageTabs takes a group storage key, so this page's pick is independent
  • Page script injects copy buttons on every non-output pre and binds them

Before merge

Still open from earlier reviews

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
apps/landing/src/pages/guides/python-logging-levels.astro 56k maple 56k/day, 82.6% err
Ingest cost of new log lines
  • apps/landing/src/pages/guides/python-logging-levels.astro:41: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:42: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:44: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:66: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:67: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:90: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:91: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:105: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:106: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
  • apps/landing/src/pages/guides/python-logging-levels.astro:131: If this logs once per call, about 452 MB/month: the file's operations run 56k times a day.
What was checked
  • group reaches docs-tabs.ts via data-lang-tabs and keys the store (docs-tabs.ts:48,70)
  • Copy buttons skip .pre-output blocks and read textContent before the button is appended (line 514)
  • Ingest endpoint/header match the documented Authorization=Bearer OTLP setup (README.md:47)

7b8c601 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

This branch has not been deployed

No deployments
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