You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@flagon.apache.org by "brucearctor (via GitHub)" <gi...@apache.org> on 2026/10/11 15:10:42 UTC

[PR] feat(userale): pluggable LogExporter architecture, unified headers, and ProtoJsonExporter (flagon)

brucearctor opened a new pull request, #184:
URL: https://github.com/apache/flagon/pull/184

   ## Summary
   Implements the pluggable exporter architecture and canonical Protobuf v1 JSON wire exporter while preserving 100% backward compatibility with the in-memory log model (`userale.filter`, `userale.map`, `addCallbacks`, and Apache Flagon Distill):
   
   - **Unified Header Builder (`buildHeaders`)**: Fixes header construction inconsistency between `sendOnInterval` and `sendOnClose` (`pagehide`), ensuring callback-based `authHeader` (`registerAuthCallback`), `registerHeadersCallback`, and `x-api-key` are applied identically across all HTTP transmissions (Closes #133).
   - **Pluggable `LogExporter` Interface & Factory**: Decouples batching/lifecycle in `sendLogs.ts` from serialization and transport via `LogExporter`, `HttpJsonExporter`, `WebSocketExporter`, `createExporter(config)`, `config.exporter`, and `config.exporterType` / `data-exporter` (Closes #139).
   - **48 KiB `keepalive` Chunking**: Splits oversized `pagehide` batches via `chunkLogsForKeepalive` so browser `fetch(..., { keepalive: true })` requests do not silently fail the 64 KiB browser limit.
   - **Canonical Protobuf v1 JSON Exporter (`ProtoJsonExporter`)**: Serializes raw, interval, and custom logs into canonical Proto3 JSON conforming to `apache.flagon.userale.v1.LogBatch` (`proto/apache/flagon/userale/v1/log.proto`), validated in Jest contract tests via `@bufbuild/protobuf` `fromJson(LogBatchSchema, ...)` without bundling the runtime into `flagon-userale` (Closes #142, Closes #143).
   
   Closes #133
   Closes #139
   Closes #142
   Closes #143
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org
For additional commands, e-mail: pr-help@flagon.apache.org


Re: [PR] feat(userale): pluggable LogExporter architecture, unified headers, and ProtoJsonExporter (flagon)

Posted by "brucearctor (via GitHub)" <gi...@apache.org>.
brucearctor merged PR #184:
URL: https://github.com/apache/flagon/pull/184


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@flagon.apache.org
For additional commands, e-mail: pr-help@flagon.apache.org