Skip to content

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

Open
hariharanweb wants to merge 2 commits into
mainfrom
feat/241-structured-log-attributes
Open

hariharanweb wants to merge 2 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

❌ Patch coverage is 90.56604% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pipeline/api/api.py 28.57% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

…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
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