Back to Prefect

instrumentation_policies

docs/v3/api-ref/python/prefect-server-orchestration-instrumentation_policies.mdx

3.6.30.dev3865 B
Original Source

prefect.server.orchestration.instrumentation_policies

Orchestration rules related to instrumenting the orchestration engine for Prefect Observability

Classes

InstrumentFlowRunStateTransitions <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/orchestration/instrumentation_policies.py#L25" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

When a Flow Run changes states, fire a Prefect Event for the state change

Methods:

after_transition <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/orchestration/instrumentation_policies.py#L28" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
after_transition(self, context: OrchestrationContext[orm_models.FlowRun, core.FlowRunPolicy]) -> None