Skip to content

Preserve asynchronous observability context - #32

Merged
anth-volk merged 4 commits into
mainfrom
feat/async-observability-context
Sep 28, 2026
Merged

anth-volk merged 4 commits into
mainfrom
feat/async-observability-context

Conversation

@anth-volk

@anth-volk anth-volk commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #31

Changes

  • restore configured dispatch attributes when a remote asynchronous operation starts
  • let locally selected attributes override values received from the dispatching process
  • include active dispatch attributes in structured records without adding them to metric labels
  • attach active dispatch attributes, including observability_id, to every nested span
  • accept explicitly supplied safe scalar attributes in local logs and spans by default, while retaining optional strict local filtering
  • restrict asynchronous transport to dispatch_attribute_keys and metric labels to metric_attribute_keys
  • remove the numeric limit on accepted attributes while retaining prohibited-name, value-type, redaction, and string-length checks
  • isolate nested and concurrent runtime context with context-variable tokens
  • ignore malformed remote context without altering application execution
  • document the separate local, asynchronous transport, and metric attribute policies

Release and consumers

The fixed changelog fragment causes the release workflow to publish policyengine-observability 3.0.1 after merge. PolicyEngine/policyengine-sim-api#686 and PolicyEngine/policyengine-api#3850 must then update their dependency constraints and lockfiles to require 3.0.1.

Validation

  • 135 package tests passed.
  • Coverage remained at or above the required 90% threshold.
  • Ruff formatting and lint checks passed.
  • Pyright passed.
  • The Towncrier changelog check passed.

@anth-volk
anth-volk marked this pull request as ready for review September 28, 2026 16:46
@anth-volk
anth-volk merged commit ccfe8e9 into main Sep 28, 2026
3 checks passed
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.

Preserve observability context across asynchronous operations

1 participant