You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For production servers with role-scoped tokens, pass separate credentials for
75
+
control-plane calls and worker-plane polling:
76
+
77
+
```python
78
+
client = Client(
79
+
"https://workflow.example.internal",
80
+
control_token="operator-token",
81
+
worker_token="worker-token",
82
+
namespace="orders",
83
+
)
84
+
```
85
+
86
+
Create one client per namespace when your deployment issues namespace-scoped
87
+
tokens. The SDK sends the configured token as `Authorization: Bearer ...` and
88
+
the namespace as `X-Namespace` on every request.
89
+
66
90
## Metrics
67
91
68
92
Pass a recorder to `Client(metrics=...)` or `Worker(metrics=...)` to collect request, poll, and task metrics. The SDK ships a no-op default, an `InMemoryMetrics` recorder for tests or custom exporter loops, and `PrometheusMetrics` for deployments that install the optional extra:
0 commit comments