Skip to content

1.0.35 - #93

Merged
yilmaztayfun merged 2 commits into
release-v1.0from
master
Aug 14, 2026
Merged

1.0.35#93
yilmaztayfun merged 2 commits into
release-v1.0from
master

Conversation

@yilmaztayfun

@yilmaztayfun yilmaztayfun commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Make HTTP header log enrichment key generation configurable and consistent across telemetry components.

New Features:

  • Add configurable RequestHeaderKeyPrefix and ResponseHeaderKeyPrefix options for logging enrichers to control header attribute key prefixes.

Enhancements:

  • Centralize HTTP header enrichment key normalization and prefix handling in a shared helper used by both EnricherLogProcessor and HttpBodyLoggingMiddleware.
  • Document header key normalization and prefix configuration, including guidance for backends that cannot store dots in flat field names.

claude and others added 2 commits August 14, 2026 11:32
Header enrich keys were built from hard-coded "RequestHeader." /
"ResponseHeader." literals, so consumers could not control the resulting
field name. Log backends that cannot store dots in flat field names
(OpenObserve, Elasticsearch) lowercase the key and replace '.' with '_' on
ingest, so an enricher configured for the header `act_sub` is queried as
`requestheader_act_sub` — the prefix is baked into the field name with no way
to opt out.

- LoggingEnricherOptions: new RequestHeaderKeyPrefix / ResponseHeaderKeyPrefix
  (defaults "RequestHeader." / "ResponseHeader.", so existing behaviour is
  unchanged). Setting a prefix to "" emits the bare normalized header name.
- New internal HeaderEnrichmentKeys centralizes key construction and header
  normalization; EnricherLogProcessor and HttpBodyLoggingMiddleware both use
  it instead of duplicating the literals and the normalize expression, so the
  two paths can no longer drift apart.
- docs/telemetry: documented the new options, the backend field-name
  normalization that motivates them, and the collision caveat when both
  prefixes are given the same value.

Only BBT.Aether.AspNetCore is affected. No behavioural change with default
configuration.
…-header-prefix

feat(telemetry): make enricher header key prefix configurable
@yilmaztayfun yilmaztayfun self-assigned this Aug 14, 2026
@yilmaztayfun
yilmaztayfun requested review from a team August 14, 2026 11:36
@sourcery-ai

sourcery-ai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds configurable prefixes for HTTP header enrichment keys and centralizes header key normalization/creation so logging enricher and HTTP body middleware stay consistent and work better with backends that dislike dots in field names.

File-Level Changes

Change Details Files
Introduce configurable request/response header enrichment key prefixes and document their behavior.
  • Add RequestHeaderKeyPrefix and ResponseHeaderKeyPrefix properties to logging enricher options with XML docs explaining normalization, backend interactions, and collision behavior.
  • Update telemetry README examples and narrative to include the new prefix options and clarify header-name normalization and backend querying implications.
framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/TelemetryOptions.cs
framework/docs/telemetry/README.md
Centralize header enrichment key construction and ensure both log processor and HTTP body middleware use the same logic and respect configured prefixes.
  • Create HeaderEnrichmentKeys helper with Normalize, Request, and Response methods that build request/response header attribute keys using the configured prefixes.
  • Refactor EnricherLogProcessor to use HeaderEnrichmentKeys instead of hard-coded RequestHeader./ResponseHeader. prefixes and an internal NormalizeHeaderKey.
  • Refactor HttpBodyLoggingMiddleware to use HeaderEnrichmentKeys, removing duplicated normalization and prefixing logic.
framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/HeaderEnrichmentKeys.cs
framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/EnricherLogProcessor.cs
framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Telemetry/HttpBodyLoggingMiddleware.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@yilmaztayfun
yilmaztayfun merged commit 55a69ed into release-v1.0 Aug 14, 2026
3 of 5 checks passed
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants