Skip to content

feat(parser): support Docker and OpenTelemetry JSON fields#2

Merged
vinnytherobot merged 1 commit into
mainfrom
feat/otel-json-parsing
Jun 7, 2026
Merged

feat(parser): support Docker and OpenTelemetry JSON fields#2
vinnytherobot merged 1 commit into
mainfrom
feat/otel-json-parsing

Conversation

@vinnytherobot

Copy link
Copy Markdown
Owner

Summary

  • Extend JSON log parsing to support Docker log payloads.
  • Add OpenTelemetry-style severity/message fields via severity_text, severityText, and body.
  • Extract service metadata from resource.attributes.service.name.
  • Infer severity from embedded bracket-style Docker log messages when no explicit JSON severity is present.
  • Document supported JSON fields in README and API reference.

Technical Notes

The parser now centralizes common JSON field lookup through helper constants and helpers, preserving the existing bracket-log and legacy JSON behavior. Docker log payloads have trailing line endings trimmed before nested parsing, allowing [ERROR] message payloads to produce the canonical ERROR level and cleaned message.

Validation

  • pytest -q
  • ruff check .
  • pytest --cov=logscope --cov-report=term-missing
  • python -m build

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

PR Check Summary

  • Conventional title: feat(parser): support Docker and OpenTelemetry JSON fields
  • Tests updated when code changes: true
  • Docs updated when code changes: true

@vinnytherobot vinnytherobot merged commit b82ea64 into main Jun 7, 2026
6 checks passed
@vinnytherobot vinnytherobot deleted the feat/otel-json-parsing branch June 7, 2026 19:58
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