8000 Add an observability behavior for logging, duration, and tracing by kzu · Pull Request #280 · devlooped/stunts · GitHub
[go: up one dir, main page]

Skip to content

Add an observability behavior for logging, duration, and tracing - #280

Merged
kzu merged 3 commits into
mainfrom
observability-behavior
Oct 7, 2026
Merged

kzu merged 3 commits into
mainfrom
observability-behavior

Conversation

@kzu
@kzu kzu commented Oct 7, 2026
Copy link
Copy Markdown
Member

Summary

  • Add ObservabilityBehavior in the net10.0 Stunts.Extensions package. It logs a call, records one duration in milliseconds, and writes one activity named for the member.
  • The behavior sits outermost, so one observation covers the rest of the pipeline, including the time until a returned task completes. Redaction changes only what is logged and tagged.
  • Fixes Add an observation behavior for logging, duration, and tracing #265

Test plan

  • Scenarios/ObservabilityBehavior.cs covers a completed call, task duration, redaction, faults, cancellation, and one outer sample around an inner retry

Keep logging and diagnostics in Stunts.Extensions so the core package stays free of them.

Fixes #265
@kzu kzu added the enhancement New feature or request label Oct 7, 2026
kzu added 2 commits October 7, 2026 19:00
Callers already have a logger and a meter, so a host registration and a sample added a second way to construct the same behavior.
The stored constructor arguments no longer need a separate field and assignment.
@kzu
kzu enabled auto-merge (rebase) October 7, 2026 22:08
@kzu
kzu merged commit 32ddaeb into main Oct 7, 2026
@kzu
kzu deleted the observability-behavior branch October 7, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an observation behavior for logging, duration, and tracing

1 participant

0