Skip to content

feat(promptflow): trace Microsoft Prompt flow, zero-code - #733

Merged
nik13 merged 5 commits into
devfrom
feat/python-promptflow-1119
Nov 19, 2026
Merged

nik13 merged 5 commits into
devfrom
feat/python-promptflow-1119

Conversation

@nik13

@nik13 nik13 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

What

New traceAI-promptflow package: tracing for Microsoft Prompt flow (promptflow-tracing >=1.12.0,<2), also registered in zero-code auto-instrumentation (fi-instrument / FI_AUTO_INSTRUMENT=true picks it up when promptflow is installed).

  • Flow runs (flex and DAG) become CHAIN spans, nodes and nested @trace functions TOOL spans, and LLM / embedding / retrieval calls get their own span kinds. Request model and parameters are recorded on LLM and embedding spans.
  • It routes Prompt flow's own tracing hooks to traceAI. Every loaded promptflow.* module that imported a hook by name is patched too (for example Prompty in promptflow.core._flow).
  • Privacy: traceAI spans drop Prompt flow's native content attributes and events (inputs, output, prompt.template, prompt.variables, promptflow.* events, exception messages and status text) whichever code path writes them. Content reaches traceAI only through the masked input.value / output.value under the hide settings.
  • Fail closed: a missing content hook is warned about and its content stays masked. If span creation cannot be intercepted, the package refuses to instrument.
  • instrument() sets PF_DISABLE_TRACING=false unless already set. Child processes (batch workers) inherit that, but not the patches, so they must call instrument() themselves (documented).

Release wiring: release-please config and manifest (0.1.0), the PyPI bootstrap list, the auto-instrumentation registry, a CI workflow (1.12.0 on Python 3.10, latest on 3.13, offline), and the docs tables.

Tests

Offline. Python 3.10 and 3.12 with promptflow 1.12.0 and 1.18.5 (and 3.13 with 1.18.5). Covered: flows, nodes, LLM calls, streams, errors, and a real Prompty call under hide_inputs (no template, variables or event exported). Also covered: masking of native content and the fail-closed paths.

@nik13
nik13 merged commit 72d4896 into dev Nov 19, 2026
219 checks passed
@nik13
nik13 deleted the feat/python-promptflow-1119 branch November 19, 2026 06:56
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.

1 participant