azure-bootstrap-primitives

Configure structured logging, correlation tracing, and ten log transports for Azure Python applications.

1|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/TheViziusGroup/vibe-engineering-skills --skill azure-bootstrap-primitives-theviziusgroup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-bootstrap-primitives
Source: https://github.com/TheViziusGroup/vibe-engineering-skills/tree/main/plugins/azure-bootstrap/skills/azure-bootstrap-primitives
Command: npx skills add https://github.com/TheViziusGroup/vibe-engineering-skills --skill azure-bootstrap-primitives-theviziusgroup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Python services on Azure need consistent structured logging, correlation IDs, secret masking, and resilient error handling, but wiring these primitives by hand across every project is repetitive and error-prone. This Skill documents the azure-bootstrap v2 Tier 1 stdlib primitives and the v2.1/v3.0 logging transports so an AI assistant can apply them correctly. ## Core Features & Use Cases - Structured logging and correlation: configure_logging with JsonLogFormatter, correlation_scope contextvars, and a DEBUG level gated behind DEBUG_LOGGING_ENABLED. - Security and resilience primitives: secret masking helpers, constant-time compare_secrets, fail-closed env loading, path confinement, soft_fail/run_phases, and a PipelineError/TransientError vocabulary for retry vs dead-letter decisions. - Ten logging transports: console, app_insights, sumo_logic, panther, file, blob, sql, nosql, adx, and event_hubs, all buffered, non-blocking, and soft no-op when env vars or extras are missing. - Use Case: When adding Sumo Logic shipping to an Azure Function, the Skill guides setting SUMO_LOGIC_COLLECTOR_URL, enabling the transport via configure_transports, and relying on the buffered NDJSON handler that retries 429/5xx with backoff. ## Quick Start Ask the assistant to configure azure-bootstrap structured logging with correlation IDs and enable the Sumo Logic transport for your Python service.

Frequently Asked Questions about azure-bootstrap-primitives

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure structured JSON logging in Python for Azure?

Call configure_logging() from azure_bootstrap, which installs an ExtraFieldsFormatter and CorrelationFilter on the root logger and is idempotent. Use JsonLogFormatter for one JSON object per line when shipping to remote ingestion endpoints like Sumo Logic.

How do I add correlation IDs to Python log records?

Wrap work in correlation_scope(correlation_id, **fields) from azure_bootstrap; the CorrelationFilter attaches every context var to each log record. It is built on contextvars, so it is safe for async tasks and concurrent requests.

Why is DEBUG logging not working even with LOG_LEVEL set to DEBUG?

DEBUG output requires a second gate: DEBUG_LOGGING_ENABLED must also be truthy, otherwise effective_log_level clamps the level to INFO. This defends against a stray manifest leaking DEBUG into production.

Does the Sumo Logic handler block or raise on network failures?

No. SumoLogicHandler appends to a bounded in-memory deque and a daemon thread performs the network I/O, so emit never blocks or raises. It retries 408/429/5xx with backoff and jitter, honors Retry-After, and drops oldest records on buffer overflow.

What happens if I enable a transport without its pip extra installed?

Transport factories return None as a soft no-op when the required extra or environment variable is missing, so enabling sumo_logic without the [sumologic] extra never errors. Install all transport dependencies with pip install 'azure-bootstrap[logging-all]'.

When should I use soft_fail versus run_phases in a pipeline?

Use soft_fail or soft_fail_with to degrade a single operation to a fallback value while optionally re-raising UnrecoverableError. Use run_phases for a sequential pipeline that never aborts midway, returning PhaseResult objects with per-phase counters.