Comparing 0.27.1...0.28.0 · modern-python/lite-bootstrap · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: modern-python/lite-bootstrap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.27.1
Choose a base ref
...
head repository: modern-python/lite-bootstrap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.28.0
Choose a head ref
  • 15 commits
  • 18 files changed
  • 2 contributors

Commits on May 2, 2026

  1. fix: cache OpenTelemetryMiddleware in litestar instrumentation

    LitestarOpenTelemetryInstrumentationMiddleware.handle constructed a fresh
    OpenTelemetryMiddleware on every request. Cache it per next_app so tracers
    and metric instruments are allocated once.
    lesnik512 committed May 2, 2026
    Configuration menu
    Copy the full SHA
    5578f63 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #80 from modern-python/fix/litestar-otel-middlewar…

    …e-cache
    
    fix: cache OpenTelemetryMiddleware in litestar instrumentation
    lesnik512 authored May 2, 2026
    Configuration menu
    Copy the full SHA
    27a684a View commit details
    Browse the repository at this point in the history
  3. chore: low-severity cleanups (path regex, message format, typo, dead …

    …test code, handler leak)
    
    - helpers/path.py: allow dots in VALID_PATH_PATTERN (e.g. /api.v1/metrics)
    - bootstrappers/base.py: standardize "is not ready: {reason}" format
    - bootstrappers/fastapi_bootstrapper.py: fix "is differ" -> "differs"
    - tests/instruments/test_sentry_instrument.py: remove unused LoggingIntegration() expression and import
    - instruments/logging_instrument.py: track handlers created by MemoryLoggerFactory and close them (plus restore propagate=True) on LoggingInstrument.teardown
    lesnik512 committed May 2, 2026
    Configuration menu
    Copy the full SHA
    41f445c View commit details
    Browse the repository at this point in the history
  4. chore: type _logger_factory as dataclass field with slots

    Use a dataclasses.field with default_factory=lambda: None so the slot is
    properly initialized on subclasses (FastAPILoggingInstrument etc.). With a
    plain default=None the inherited init=False field is silently skipped in the
    subclass-generated __init__ when parent has slots=True.
    lesnik512 committed May 2, 2026
    Configuration menu
    Copy the full SHA
    8db9be3 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #81 from modern-python/fix/low-severity-cleanups

    Fix/low severity cleanups
    lesnik512 authored May 2, 2026
    Configuration menu
    Copy the full SHA
    3febf3b View commit details
    Browse the repository at this point in the history
  6. fix: preserve teardown error detail via TeardownError exception

    Add lite_bootstrap.exceptions module with LiteBootstrapError(RuntimeError)
    base and BootstrapperNotReadyError, ConfigurationError, TeardownError
    subclasses. TeardownError aggregates every (instrument_name, exception)
    pair into both the message string and a public .errors attribute, so
    detail survives even when LoggingInstrument tears down before later
    instrument failures are logged. All four prior RuntimeError raise sites
    in the package migrate to the new tree; subclassing RuntimeError keeps
    existing `except RuntimeError:` callers working.
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    lesnik512 and claude committed May 2, 2026
    Configuration menu
    Copy the full SHA
    a071074 View commit details
    Browse the repository at this point in the history
  7. perf: hoist OTel import in tracer_injection to module level

    tracer_injection runs once per log line. The previous in-function
    `try / from opentelemetry import trace / except ImportError` paid the
    try-machinery and import-lookup cost on every call, even though
    import_checker.is_opentelemetry_installed already settles the question
    at startup. Move the import into a module-level guard parallel to the
    existing is_structlog_installed block, defining a no-op fallback
    tracer_injection in the else branch for environments without OTel.
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    lesnik512 and claude committed May 2, 2026
    Configuration menu
    Copy the full SHA
    5abb30d View commit details
    Browse the repository at this point in the history
  8. Merge pull request #82 from modern-python/fix/teardown-error-detail

    fix: preserve teardown error detail via TeardownError exception
    lesnik512 authored May 2, 2026
    Configuration menu
    Copy the full SHA
    7d61c89 View commit details
    Browse the repository at this point in the history
  9. Merge pull request #83 from modern-python/fix/tracer-injection-module…

    …-import
    
    perf: hoist OTel import in tracer_injection to module level
    lesnik512 authored May 2, 2026
    Configuration menu
    Copy the full SHA
    7717b7b View commit details
    Browse the repository at this point in the history
  10. refactor: declare opentelemetry_service_name/namespace on PyroscopeCo…

    …nfig
    
    Replace two getattr(..., None) calls in PyroscopeInstrument.bootstrap()
    with direct attribute access. The fields are added to PyroscopeConfig
    with default None; in framework configs MRO causes OpentelemetryConfig's
    declarations to win, so behavior is unchanged. Standalone PyroscopeConfig
    users can now set these fields directly without the cross-class coupling.
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    lesnik512 and claude committed May 2, 2026
    Configuration menu
    Copy the full SHA
    7137776 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #84 from modern-python/fix/pyroscope-otel-fields

    refactor: declare opentelemetry_service_name/namespace on PyroscopeCo…
    lesnik512 authored May 2, 2026
    Configuration menu
    Copy the full SHA
    00ad6ba View commit details
    Browse the repository at this point in the history
  12. feat: add logging_enabled flag, decouple from service_debug

    LoggingInstrument.is_ready() previously returned False whenever
    service_debug=True — and BaseConfig.service_debug defaults to True. So
    out of the box, the structured-logging instrument silently skipped its
    own bootstrap, and users assumed the JSON logging pipeline was working
    when it wasn't.
    
    Add a dedicated logging_enabled: bool = True field on LoggingConfig and
    gate is_ready() on it instead. service_debug stays focused on framework
    debug mode (FastAPI/Litestar app.debug). Default behavior changes:
    projects with no overrides now get structured logging. Users who want
    the old skip-logging behavior set logging_enabled=False explicitly.
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    lesnik512 and claude committed May 2, 2026
    Configuration menu
    Copy the full SHA
    4281cf4 View commit details
    Browse the repository at this point in the history
  13. Merge pull request #85 from modern-python/fix/logging-enabled-flag

    feat: add logging_enabled flag, decouple from service_debug
    lesnik512 authored May 2, 2026
    Configuration menu
    Copy the full SHA
    735f2ed View commit details
    Browse the repository at this point in the history
  14. feat: unify instrument skip feedback through warning subclasses

    Both bootstrap skip paths (missing dependency, not ready) now emit
    warnings.warn with distinct UserWarning subclasses
    (InstrumentDependencyMissingWarning, InstrumentNotReadyWarning, sharing
    InstrumentSkippedWarning base) so users can filter, capture, or escalate
    each independently. Previously not-ready skips went to logger.info and
    were silently dropped before the logging instrument finished bootstrapping.
    
    Also drop stale service_debug=False notes from the docs (logging is now
    gated by logging_enabled, default True).
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    lesnik512 and claude committed May 2, 2026
    Configuration menu
    Copy the full SHA
    992b3db View commit details
    Browse the repository at this point in the history
  15. Merge pull request #86 from modern-python/fix/instrument-skip-warnings

    feat: unify instrument skip feedback through warning subclasses
    lesnik512 authored May 2, 2026
    Configuration menu
    Copy the full SHA
    2db731f View commit details
    Browse the repository at this point in the history
Loading