Observability
Two ids tie everything together
- The request id — every answer carries
X-Request-Id, and every refusal repeats it asrequestId. Log it with every call; it is what Anis needs to find your call. - The operation id — the id you chose for an order. Log it at every step, from storing the intent to storing the codes. It traces one purchase across your system and Anis.
What to alert on
| Signal | Why |
|---|---|
Orders whose outcome is unknown — timeouts, lost connections, unverifiable answers, refusals that may still complete, and refusals of your access (invalid_credentials, insufficient_scope, wallet_not_granted) that say nothing about an earlier attempt |
Each one must be resumed with the same operation id — after a refusal of your access, once access is restored |
| Answers that could not be verified | Something between you and Anis changed an answer, a clock is badly out, or an Anis key rotation was missed. One short burst of unsigned 503s on signed calls is Anis’s own signing being briefly unavailable |
invalid_credentials on every call |
The key was revoked or replaced, or the clock drifted. On an order, restore access, then resume the same id |
rate_limited |
Your traffic is near a limit Anis staff set |
Never record
Your private key, signatures, signature bases, nonces, the enrolment token, or card codes (serials and vouchers) — anywhere: logs, traces, metrics or error reports.
With the .NET SDK
The SDK reports everything under one name, Anis.Partners.Sdk, for traces and for metrics, and logs through your
own logging:
builder.Services.AddOpenTelemetry()
.WithTracing(tracing => tracing.AddSource("Anis.Partners.Sdk"))
.WithMetrics(metrics => metrics.AddMeter("Anis.Partners.Sdk"));
| Metric | What it tells you |
|---|---|
anis.partners.order.outcomes |
Orders by outcome: completed, processing, replayed — and unknown, the one to alert on (from SDK 1.1.0 it also counts orders refused for a rate limit or for your access) |
anis.partners.request.duration |
Every call, by route and status or refusal code |
anis.partners.signature.duration |
Time spent signing — a slow vault shows here |
anis.partners.response.verification.failures |
Answers thrown away, by the rule that failed |
anis.partners.signing_keys.fetches |
Fetches of Anis’s public keys; a rising refresh means a rotation |
Each call’s trace carries the route, the request id and, on orders, the operation id. The SDK never records any of the secrets above — its tests check every log line, trace and metric for them.
More in the .NET SDK page.
With the PHP, TypeScript and Node.js, or Python SDK
They report the same metrics, attributes and log events as the .NET SDK, under their own instrumentation name:
| SDK | Traces and metrics (OpenTelemetry) | Logs |
|---|---|---|
| PHP | anis-ly/partners |
Your PSR-3 logger |
| TypeScript and Node.js | @anis-ly/partners |
The logger you pass to the client |
| Python | anis_partners |
The standard logging module, logger anis_partners |