feat: add options, diagnostics, URL redaction, and the pipeline context#4
Merged
Conversation
Bite-sized TDD plan for slices 2-3: DexpaceClientOptions POCOs, the Dexpace.Sdk ActivitySource/Meter, UrlRedactor, and PipelineContext. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…boundary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Adds the building blocks the pipeline and policy slices depend on — all in
Dexpace.Sdk.Core, with no new runtime dependencies.DexpaceClientOptions(+RetryOptions,RedirectOptions) — plain configuration POCOs with sensible enterprise defaults (3 retries with capped backoff, max 20 redirects, no HTTPS→HTTP downgrade, no cross-origin header leakage). TheMicrosoft.Extensions.Optionsbinding and validation will live in the DI integration package, so these stay container-agnostic andnew-able.DexpaceDiagnostics— a singleActivitySourceandMeternamedDexpace.Sdk, so OpenTelemetry / Application Insights light up with no adapters. (System.Diagnostics.DiagnosticSourceis in-box on net8/net10, so no package was needed.)UrlRedactor— produces a log-safe URL string: strips userinfo, drops the fragment, and replaces sensitive query-parameter values withREDACTED(configurable, case-insensitive), while preserving the path. Robust for both absolute and relative URIs — it never throws and never emits an un-redacted sensitive value.PipelineContext— the mutable per-call state (request, response-as-it-arrives, the activeActivity, the options snapshot, an attempt counter, and a typed property bag) that flows through the pipeline.Test plan
dotnet build -c Releaseis clean on net8.0 and net10.0 (warnings-as-errors + XML-doc gate)dotnet test -c Releasepasses (74 tests: 61 core, 13 serialization)🤖 Generated with Claude Code