Introduce ILogger and ActivitySource based logging#649
Merged
Conversation
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.
This was referenced May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires
Microsoft.Extensions.Logging.AbstractionsintoProxyvia an optionalILoggerFactory. 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 ofAuthorization,Cookie, and similar.Adds an
ActivitySource("Fluxzy.Core")with one Activity per processed exchange, OTel HTTP semantic-convention tags, and W3Ctraceparentingestion so traces stitch with upstream callers.Two scopes (connection and exchange) carry stable correlation IDs.
Removes the legacy
Dstatic console-tracing class and the now-redundant--traceCLI option. TheDflag only ever toggledConsole.WriteLineoutput, not anything reachable viaILogger.See
docs/logging.mdfor the event schema and properties.