Skip to content

feat: log fields as attributes, not message text [#241] - #47

Merged
hariharanweb merged 3 commits into
mainfrom
feat/241-structured-log-attributes
Nov 17, 2026
Merged

hariharanweb merged 3 commits into
mainfrom
feat/241-structured-log-attributes

Conversation

@hariharanweb

Copy link
Copy Markdown
Collaborator

Log fields were packed into the message text, so HyperDX could not filter on them.

  • Each line is a short, fixed message; fields go in extra= and export as attributes
  • Temporal's context is flattened into dotted keys (temporal_activity.workflow_id) and no longer repeated in the message
  • name fields renamed to scheme_name / activity_type / workflow_type, since name is a reserved log key
  • Console still prints key=value, so local greps keep working

Relates to OpenAgriNet/engineering-tracker#241

🤖 Generated with Claude Code

- Each line is a short, fixed message; fields go in extra= as attributes
- HyperDX can filter on workflow_id, status, uri, duration_ms and the rest
- Temporal's context dict is flattened into dotted keys, not repeated in the message
- Console still prints key=value, so local greps keep working
- Tests read record attributes instead of message text
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

hariharanweb and others added 2 commits November 12, 2026 13:13
…241]

- Cancelling a workflow logs "workflow cancelled" at WARNING
- A failed Redis push logs a warning and the sync still succeeds
- Temporal's message setting moves next to the interceptor, so it applies without the worker
- Fixes test_activity_logging failing when run on its own
…241]

Codecov flagged 5 untested lines in pipeline/api/api.py: the MinIO bucket
creation log at startup and the four vector-delete exception handlers.
Each test drives the failure and checks the fields arrive as attributes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hariharanweb
hariharanweb merged commit 8d31c44 into main Nov 17, 2026
3 checks passed
@hariharanweb
hariharanweb deleted the feat/241-structured-log-attributes branch November 17, 2026 06:04
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