Skip to content

Strengthen structured logging for composition/scatter-gather fallback paths#1018

Merged
mauroservienti merged 18 commits into
masterfrom
copilot/review-logging-improvements
Feb 25, 2026
Merged

Strengthen structured logging for composition/scatter-gather fallback paths#1018
mauroservienti merged 18 commits into
masterfrom
copilot/review-logging-improvements

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

This PR tightens logging around degraded execution paths and aligns warning logs with Microsoft.Extensions.Logging structured conventions. Scope is intentionally narrow: improve observability without changing request behavior.

  • Structured warning templates (response serialization config)

    • Replaced interpolated warning text with a message template + named property in ResponseSerializationOptions.ValidateConfiguration(...).
    • Preserves current warning semantics while making logs filterable/aggregatable.
  • Explicit warning for ignored downstream scatter/gather failures

    • HttpGatherer.Gather(...) now logs Warning when IgnoreDownstreamRequestErrors swallows HttpRequestException.
    • Emits structured fields:
      • GathererKey
      • DestinationUrl
    • Exception is attached to preserve stack/context in sinks.
  • Focused diagnostics assertions

    • Updated logging tests to assert template (OriginalFormat) and structured properties rather than only rendered message text.
    • Improved assertion clarity for property extraction.
  • Scope correction from review feedback

    • Reverted unrelated nullability/transform changes in HttpGatherer so the PR remains logging-only.
_logger?.LogWarning(
    ex,
    "Ignoring downstream request error for gatherer {GathererKey} at {DestinationUrl}.",
    Key,
    destination);

PoA

  • PR description
  • Apply labels as appropriate
  • tests
  • documentation

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Review and improve logging in codebase Improve logging quality by using structured warning templates Feb 24, 2026
Copilot AI requested a review from mauroservienti February 24, 2026 16:34
Copilot AI changed the title Improve logging quality by using structured warning templates Improve observability for silent composition/scatter-gather fallback paths Feb 24, 2026
Comment thread src/ServiceComposer.AspNetCore/ScatterGather/HttpGatherer.cs Outdated
Copilot AI requested a review from mauroservienti February 24, 2026 17:22
Copilot AI changed the title Improve observability for silent composition/scatter-gather fallback paths Strengthen structured logging for composition/scatter-gather fallback paths Feb 25, 2026
@mauroservienti mauroservienti added the enhancement Enhancement to existing features label Feb 25, 2026
@mauroservienti mauroservienti linked an issue Feb 25, 2026 that may be closed by this pull request
@mauroservienti mauroservienti marked this pull request as ready for review February 25, 2026 09:09
Copilot AI and others added 11 commits February 25, 2026 10:09
Co-authored-by: mauroservienti <1325611+mauroservienti@users.noreply.github.com>
Co-authored-by: mauroservienti <1325611+mauroservienti@users.noreply.github.com>
Co-authored-by: mauroservienti <1325611+mauroservienti@users.noreply.github.com>
Co-authored-by: mauroservienti <1325611+mauroservienti@users.noreply.github.com>
Co-authored-by: mauroservienti <1325611+mauroservienti@users.noreply.github.com>
@mauroservienti mauroservienti force-pushed the copilot/review-logging-improvements branch from 11d2122 to 219f40b Compare February 25, 2026 09:09
@mauroservienti mauroservienti enabled auto-merge (squash) February 25, 2026 09:09
@mauroservienti mauroservienti merged commit 3dcb39b into master Feb 25, 2026
3 checks passed
@mauroservienti mauroservienti deleted the copilot/review-logging-improvements branch February 25, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review how logging is done

2 participants