Skip to content

Introduce ILogger and ActivitySource based logging#649

Merged
haga-rak merged 6 commits into
mainfrom
dev/introduce-abstraction-logger
May 3, 2026
Merged

Introduce ILogger and ActivitySource based logging#649
haga-rak merged 6 commits into
mainfrom
dev/introduce-abstraction-logger

Conversation

@haga-rak
Copy link
Copy Markdown
Owner

Summary

Wires Microsoft.Extensions.Logging.Abstractions into Proxy via an optional ILoggerFactory. Emits structured events for the full request waterfall: connection lifecycle, DNS, pool resolution, request send, response receive, exchange completion, pool churn, plus a Trace-level header envelope with default redaction of Authorization, Cookie, and similar.

Adds an ActivitySource("Fluxzy.Core") with one Activity per processed exchange, OTel HTTP semantic-convention tags, and W3C traceparent ingestion so traces stitch with upstream callers.

Two scopes (connection and exchange) carry stable correlation IDs.

Removes the legacy D static console-tracing class and the now-redundant --trace CLI option. The D flag only ever toggled Console.WriteLine output, not anything reachable via ILogger.

See docs/logging.md for the event schema and properties.

haga-rak and others added 6 commits April 25, 2026 00:30
Add an optional ILoggerFactory parameter to the Proxy constructor and
emit structured events through Microsoft.Extensions.Logging.Abstractions
for connection lifecycle, DNS, pool resolution, request send, response
receive, exchange completion, pool churn, and a Trace-level header
envelope with redaction. Open one ActivitySource per processed exchange
with OTel HTTP semantic-convention tags and W3C traceparent ingestion.
Remove the legacy D class and the now-redundant --trace CLI option.
Adds a per-Proxy Guid emitted as the fluxzy.proxy.instance_id tag on every
activity from the Fluxzy.Core ActivitySource. Lets consumers correlate or
filter traces to a specific Proxy when several run in-process, and fixes a
flaky ActivitySourceTests caused by parallel test classes sharing the
global listener.
New option emits Fluxzy diagnostic logs to the console. Bare -t logs at
Debug level, -t deep logs at Trace level. Builds an ILoggerFactory from
Microsoft.Extensions.Logging.Console and passes it to Proxy.
@haga-rak haga-rak merged commit 6210fec into main May 3, 2026
2 checks passed
@haga-rak haga-rak deleted the dev/introduce-abstraction-logger branch May 7, 2026 21:56
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