Skip to content

feat(logs): wire stateful encoding into log agent pipeline#49220

Draft
DDuongNguyen wants to merge 1 commit into04-10-feat_logs_add_pattern_extraction_to_grpc_stateful_senderfrom
04-10-feat_logs_wire_stateful_encoding_into_log_agent_pipeline
Draft

feat(logs): wire stateful encoding into log agent pipeline#49220
DDuongNguyen wants to merge 1 commit into04-10-feat_logs_add_pattern_extraction_to_grpc_stateful_senderfrom
04-10-feat_logs_wire_stateful_encoding_into_log_agent_pipeline

Conversation

@DDuongNguyen
Copy link
Copy Markdown
Contributor

@DDuongNguyen DDuongNguyen commented Apr 10, 2026

What does this PR do?

Wires the stateful encoding feature into the log agent's pipeline and status reporting:

  • Pipeline integration (pkg/logs/pipeline/): pipeline.go and provider.go updated to instantiate the gRPC sender with pattern encoding when use_grpc is enabled
  • Agent implementation (comp/logs/agent/agentimpl/): agent.go and agent_test.go updated for the new sender construction path
  • Status reporting (pkg/logs/status/, status templates): Adds stateful encoding state (active patterns, cluster count, cache stats) to agent status output
  • Message type (pkg/logs/message/message.go): Extends the Message struct to carry pattern metadata through the pipeline

This is PR 6/6 in a stack. The final integration layer that connects all previous PRs into the running agent. Depends on PR 5 (#49219).

Motivation

All the building blocks (tokens, tokenizer, eviction, clustering, sender) are in place — this PR connects them to the actual log agent lifecycle so the feature activates when configured.

Describe how you validated your changes

  • Existing agent tests updated and passing
  • Status output includes new stateful encoding section
  • End-to-end manual testing with use_grpc: true configuration

How to Review this PR

  1. pkg/logs/pipeline/provider.go — the main wiring point where the gRPC sender is selected
  2. comp/logs/agent/agentimpl/agent.go — agent lifecycle changes
  3. pkg/logs/status/builder.go — new status fields
  4. Status templates — verify the display format
  5. This is intentionally the smallest PR in the stack (~40 net lines)

Additional Notes

This is the thinnest PR in the stack by design — it only wires existing components together. If any upstream PR needs changes, this one will likely need a trivial rebase.

Copy link
Copy Markdown
Contributor Author

DDuongNguyen commented Apr 10, 2026

@DDuongNguyen DDuongNguyen force-pushed the 04-10-feat_logs_add_pattern_extraction_to_grpc_stateful_sender branch from 381377c to aaabc7d Compare April 10, 2026 22:06
@DDuongNguyen DDuongNguyen force-pushed the 04-10-feat_logs_wire_stateful_encoding_into_log_agent_pipeline branch from 0c750f0 to 3a5d6f0 Compare April 10, 2026 22:06
@DDuongNguyen DDuongNguyen force-pushed the 04-10-feat_logs_add_pattern_extraction_to_grpc_stateful_sender branch from aaabc7d to f397434 Compare April 14, 2026 16:34
@DDuongNguyen DDuongNguyen force-pushed the 04-10-feat_logs_wire_stateful_encoding_into_log_agent_pipeline branch from 3a5d6f0 to 6eb9d20 Compare April 14, 2026 16:34
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