← Glossary
observability

Structured Logging

Structured logging is a practice where logs are emitted in a consistent, machine-readable format (typically JSON) containing key-value pairs rather than unstructured plain text.

In complex agent loops involving multiple tools, standard logs become useless. Structured logging allows teams to query logs based on specific fields (e.g., `agent_id`, `tool_name`, `error_code`), making it possible to reconstruct the exact path an agent took through a multi-step task when debugging a failure in production.

Related terms
observabilitytelemetryaudit-trail
Learn more
gemini-enterprise-agents