The gateway writes its own operational log to standard output and standard error, separate from the request logs it sends to logging destinations. This page explains how to control that log and what each line that an operator is likely to see means, so you can tell a normal line from one that needs action.
A real-world scenario
An operator sees WEBHOOK_SIGNING_SECRET is invalid (too short). Webhook alerts will not be sent until it is fixed in the container log after a deploy. She looks it up here, reads that no webhook alert is being sent while Slack alerts still are, generates a longer secret, redeploys, and confirms the line is gone and a test alert reaches the webhook.
| Logger name | What it covers |
|---|
Spanway Proxy | The gateway itself, including authentication, management routes, alerting, audit logging and email. |
Spanway Router | Routing decisions, retries, fallbacks and cooldowns. |
Spanway | The model call layer, cost calculation and the logging integrations. |
| Control | Effect |
|---|
SPANWAY_LOG | The lowest level that is printed, DEBUG, INFO, WARNING or ERROR. With SPANWAY_LOG unset the gateway prints WARNING and above. The AWS deployment sets INFO. SPANWAY_LOG=ERROR also silences the invalid key warnings. |
--debug or DEBUG=true | Turns on INFO for the gateway's loggers, so you see each request's progress without the bodies. |
--detailed_debug or DETAILED_DEBUG=true | Turns on DEBUG for every logger, which prints request and response bodies. Never use it in production. |
JSON_LOGS=true | One JSON object per line with the level, logger, message, time and, for a request, its call id. Only the value true turns it on. |
NO_COLOR | Turns colour off when the output is a terminal. |
spanway_settings.log_client_error_tracebacks | When true, client errors such as invalid keys are logged at ERROR with a traceback. By default they are a one line WARNING. |
spanway_settings.redact_messages_in_exceptions | On by default. Keeps prompt text out of exception messages, alerts and the log. |
spanway_settings.json_logs | true turns on JSON logs from the config file, the same as JSON_LOGS=true. |
SPANWAY_DISABLE_ACCESS_LOG_PATHS | A comma separated list of paths, for example /health/liveliness,/health/readiness, whose access log lines are dropped. Useful when load balancer health checks flood the log. Unset, every request gets an access line. |
MAX_STRING_LENGTH_STDOUT_LOG | The longest line, in characters, written to the console (default 4096). A longer line keeps its start and end with a skipped <n> chars marker in the middle, so one huge payload cannot flood the log. |
MAX_BASE64_LENGTH_STDOUT_LOG | Runs of base64 data longer than this many characters (default 4096), such as an inline image, are replaced by their size before the line is written. |
SPANWAY_DISABLE_REDACT_SECRETS | true turns off the secret redaction described below, so keys and tokens can appear in the log in clear text. Only for a local debugging session, never in production, and turn it off again before the log is shared. |
Lines below WARNING go to standard output and WARNING and above go to standard error, so a collector that reads severity from the stream sees errors as errors. The one exception is the invalid key warning, which goes to standard output so SPANWAY_LOG=ERROR can hide it. Secrets that look like keys are redacted from every line before it is written, unless SPANWAY_DISABLE_REDACT_SECRETS=true is set.
Check the level
-
Start the gateway with the level you want and its database, then send one request with a key that does not start with sk-:
docker run --rm -p 4000:4000 -v "$PWD/config.yaml:/app/config.yaml" \
-e SPANWAY_MASTER_KEY -e DATABASE_URL -e SPANWAY_LOG=INFO \
registry.spanway.ai/spanway/spanway-ai:2.0.0 --config /app/config.yaml --port 4000
curl -X POST http://localhost:4000/v1/chat/completions \
-H "Authorization: Bearer not-a-key" -H "Content-Type: application/json" \
-d '{"model": "claude-haiku-5-5", "messages": [{"role": "user", "content": "Hi"}]}'
-
Expected result: the client gets a 401 with Spanway Virtual Key expected. The key is expected to start with 'sk-'., and standard output shows one WARNING line from Spanway Proxy starting with spanway.proxy.proxy_server.user_api_key_auth(): Exception occured with the requester IP, and no traceback. With SPANWAY_LOG=ERROR the line does not appear. A key that starts with sk- but is unknown is logged at ERROR on standard error instead, and without a database every key other than the master key gets 400 No connected db., also at ERROR.
Admin UI Home lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Spanway: Failed to fetch blog posts from <url>: <reason>. Falling back to local backup. | The Home page Updates panel could not read the blog feed, so it shows the copy bundled with the release. The fallback is kept for an hour, so the line repeats at most once an hour per worker. | None if the gateway has no internet access on purpose. Set SPANWAY_LOCAL_BLOG_POSTS=True or SPANWAY_AIRGAPPED=True to stop trying, or point SPANWAY_BLOG_POSTS_URL at a feed the gateway can reach. |
| WARNING | Spanway: Parsed RSS feed has no valid posts. Falling back to local backup. | The feed answered but held no post with a title and a link. | Check the feed at SPANWAY_BLOG_POSTS_URL. |
| WARNING | Spanway: failed to fetch What's new launches from <url>: <reason>. Serving the bundled list for the life of this process. | The What's new cards could not read the remote list set in SPANWAY_WHATS_NEW_URL, so the bundled list is used until the gateway restarts. | Fix or unset SPANWAY_WHATS_NEW_URL, then restart. SPANWAY_LOCAL_WHATS_NEW=True or SPANWAY_AIRGAPPED=True always uses the bundled list. |
Startup lines
| Level | Line | Meaning | Action |
|---|
| Output | Initialized Success Callbacks - [...], Initialized Failure Callbacks - [...], Initialized Audit Log Callbacks - [...] | The config file callbacks loaded. | None. A name missing from the list was not recognised. See logging. |
| WARNING | DEBUG OUTPUT PRINTS REQUEST AND RESPONSE BODIES: <modes>. Prompts, responses and request metadata reach the logs whatever store_prompts_in_spend_logs, turn_off_message_logging or zero data retention say. Never run this in production. | --detailed_debug, SPANWAY_LOG=DEBUG or SPANWAY_PRINT_STANDARD_LOGGING_PAYLOAD is on. | Turn them off outside development. Controlled by those three settings. |
| WARNING | Webhook alerting is enabled without WEBHOOK_SIGNING_SECRET, so alerts are sent unsigned and receivers cannot verify them or reject replays | Webhook alerts work but are unsigned. | Set WEBHOOK_SIGNING_SECRET before production. See alerting. |
| ERROR | WEBHOOK_SIGNING_SECRET is invalid (<reason>). Webhook alerts will not be sent until it is fixed | The secret is too short or not valid base64 after whsec_. No webhook alert is sent. | Fix the secret. Other alert destinations keep working. |
| WARNING | RESEND_API_KEY is not set, Resend emails will be rejected | The resend_email logger has no key. | Set the variable. See email. |
| WARNING | <variable> is set but email customization requires an enterprise license, using the default | A branding variable is set without a license. | Add a license or remove the variable. |
| WARNING | New Relic: unknown newrelic_region '<value>'; supported regions: eu, us. Using the default (US) endpoint. | NEW_RELIC_REGION is not us or eu. | Fix the value. |
| WARNING | OpenTelemetry: unknown span exporter '<value>', spans are printed to the console instead of being sent. ... | OTEL_EXPORTER has an unknown value, so spans never reach the collector. | Fix the value. See OpenTelemetry. |
| WARNING | OpenTelemetry: Unknown log exporter '<value>', defaulting to console. Supported: console, otlp_http, otlp_grpc | With OpenTelemetry events on, the events exporter has an unknown value, so events are printed instead of sent. Spans are not affected. | Fix OTEL_LOGS_EXPORTER or OTEL_EXPORTER. |
| ERROR | A line naming an unknown metric or label from prometheus_metrics_config | The Prometheus config names something that does not exist, and startup stops. | Fix the name. See Prometheus. |
| DEBUG | mounting metrics endpoint | The prometheus callback loaded. | None. |
FIPS mode lines
These lines come from the FIPS 140-3 image and only appear while SPANWAY_FIPS_MODE is on.
| Level | Line | Meaning | Action |
|---|
| Output | Spanway Proxy: FIPS mode is on, OpenSSL <version> enforces the FIPS 140-3 policy | The FIPS startup checks passed. | None. |
| WARNING | Sign-in refused: this password was stored with scrypt, which FIPS mode cannot check. ... | A password set on the standard image cannot be checked in FIPS mode, so the sign-in was refused. | Set the user's password again or have them use SSO. |
API docs lines
These lines come from API docs and build details.
| Level | Line | Meaning | Action |
|---|
| INFO | Spanway API docs: answered 404 to <method> <path> because the caller is not a signed-in user. Set SPANWAY_PUBLIC_API_DOCS=true to publish the docs. | A caller without a signed-in user's key asked for the explorer, the OpenAPI document or the route list and got 404. The key is never logged. | None. Many lines from one address are a scanner. When your own tool causes them, give it a personal key. |
Public feed rate limit lines
These lines come from the public feed rate limit.
| Level | Line | Meaning | Action |
|---|
| WARNING | Spanway public route rate limit: answered 429 to <method> <path> because one address sent more than <n> requests this minute. Raise general_settings.public_route_rate_limit_per_minute if this is expected traffic. | The first refusal for one address in a minute. The address is never logged. | None for a scraper. When your own tool or office causes it, raise the limit. |
| WARNING | Spanway public route rate limit: the request counter is unreachable, letting the request through (<error type>) | The gateway cache did not answer, so the public request was served without being counted. | Check the cache and Redis connection. |
Request lines
| Level | Line | Meaning | Action |
|---|
| WARNING | spanway.proxy.proxy_server.user_api_key_auth(): Exception occured - <error> Requester IP Address:<ip> | A request carried a key that does not start with sk-, so it cannot be a virtual key, for example a provider key. The client got a 401 with Spanway Virtual Key expected. | None for the odd one. A flood means a leaked or rotated key is still in use somewhere, so find the caller by IP. Becomes ERROR with a traceback when log_client_error_tracebacks is on. |
| ERROR | The same line for other authentication failures | An sk- key the gateway does not know (Invalid proxy server token passed), no database (No connected db.), a blocked key, expired key, IP outside the allowed ranges or a JWT that does not validate. | Read the error text. See the error reference. |
| WARNING | Model=<name> not found in completion cost map. Setting 'response_cost' to None | The model has no price. Its spend log row is recorded at 0 and marked unpriced, so totals still add up and budgets do not count it. | Add a price with custom pricing. |
| WARNING | Billable request has no price and is logged as unpriced (model_group=<group> model=<model> provider=<provider> ...): ... Counted in spanway_zero_cost_requests_total{reason="model_not_priced"} | The same case, with the model group, provider and token counts, and the counter you can alert on. | The same. |
| WARNING | register_model: model=<model> has custom pricing but not in built-in cost map ...; cache_creation_input_token_cost and cache_read_input_token_cost will default to 0 for this model | A deployment has its own prices but no cache prices, so cached tokens cost nothing in spend. | Add the cache prices to model_info when the provider bills them. |
| ERROR | Spanway.LoggingError: [Non-Blocking] Exception occurred while success logging <traceback> | A logging callback raised. The request was unaffected. | Read the traceback for the destination and cause. spanway_callback_logging_failures_metric counts these. See logging. |
| ERROR | Spanway.LoggingError: [Non-Blocking] Exception occurred in async_logging_hook <traceback> | A logging hook raised. The request was unaffected. | The same. |
| ERROR | Langfuse Layer Error - <traceback> | Langfuse rejected a generation. | Check the Langfuse keys and host. |
| ERROR | Langsmith Error: <status> - <text> | LangSmith rejected a batch. | 401 means the key is wrong, 404 the project or tenant. |
| WARNING | Deployment speed <operation> through Redis failed, using local speeds: <error> | Provider preference sorting by latency or throughput could not use the shared measurements in Redis and fell back to this process's own. | None during a short Redis outage. Check the Redis settings if it repeats. See provider preferences. |
| ERROR | Defaulting to os.environ value for key=<NAME>. An exception occurred - <error> | A secret manager lookup failed and the environment variable of the same name was used, which may be empty. The value is never logged. | Fix the secret or the access, then restart. See secret managers. |
| WARNING | shadow_eval: budget unverifiable for <leg id>, sample skipped: <error> | A shadow eval sample was skipped because its eval spend could not be read. | None during a short database outage. See shadow evals. |
| WARNING | Overwriting Langfuse <field> from request header | A header set a trace field that the metadata also set. | None. |
| ERROR | OpenTelemetry: Error setting tools attributes: <error> | A tool definition could not be recorded on a span. The span was still sent. | None unless it repeats for every request. |
| WARNING | Error recording <metric> metric: <error> | One Prometheus update was skipped. | None if rare. Otherwise check the shared metrics directory. |
Alerting and email lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Error sending spend report: <error>, Error sending weekly spend report <error> | A scheduled report could not be sent. | Check the destination and alerting_args. |
| ERROR | Invalid time range format: <error> | A spend report got a time range it could not parse. | Check the report settings. |
| ERROR | Error sending send_virtual_key_event_slack <error> | A key event alert could not be posted to Slack. | Check SLACK_WEBHOOK_URL. |
| ERROR | Error sending email alert <error> | The email alerting destination failed. | Check the email logger. See email. |
| ERROR | Trying to send email alert to no recipient | An alert email had nobody to go to. | Give the key or user an email address. |
| WARNING | Max budget alert at <n>% has no recipients, skipping | A budget threshold was crossed and the key or team has no owner with an email. | Give the key an owner. |
| WARNING | Ignoring non-numeric max budget alert threshold <value> | A budget alert threshold is not a number. | Fix the setting. |
| ERROR | Failed to send email alert <key>: <error> | The email provider rejected a message. | Read the provider's answer in the line. |
| WARNING | Could not release email alert claim <key>: <error> | A cache write failed after an email was sent. The same alert may be sent twice. | Check the cache. |
| WARNING | Ignoring malformed general_settings.email_settings: <error> | The stored email switches could not be read, so the defaults apply. | Save the switches again from the Admin UI. |
| WARNING | No email provider configured (set SMTP_HOST, RESEND_API_KEY or SENDGRID_API_KEY), dropping email '<subject>' from <sender> to <recipients> | An email was due but no provider is set up. | Set one of the variables. |
| ERROR | Webhook alerting is enabled but no webhook URL is configured for alert type=<type>. Set WEBHOOK_URL | The webhook destination has no address. | Set WEBHOOK_URL. |
| WARNING | Webhook alert <type> to <host> was rejected with status <code> after <n> attempt(s) | The alert receiver answered with an error. | Check the receiver. See alerting. |
| WARNING | Webhook alert <type> to <host> failed after <n> attempt(s): <error> | The receiver could not be reached. | Check the address and network. |
| ERROR | PagerDuty: PAGERDUTY_API_KEY is not set, dropping alert: <summary> | No page was sent. | Set PAGERDUTY_API_KEY. |
Audit log lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Failed Creating audit log <error> | The hash chain could not be extended, so the row was stored without hashes. GET /audit/verify counts it in unhashed_rows. | Check the database. See audit logs. |
| ERROR | Failed Creating unchained audit log <error> | The row without hashes could not be stored either, so the audit log has a real gap. When this follows a reveal of hidden log content, the reveal was refused with a 503 and nothing was shown. | Check the database at once. |
| WARNING | 'audit_log_callbacks' is configured but audit logging is not enabled. Audit log callbacks will not fire. | No audit row reaches any destination. | Set store_audit_logs: true or add a license. |
| ERROR | prisma_client is None, cannot write audit log to DB | Audit logging is on with no database. | Set DATABASE_URL. |
| WARNING | Could not read the custom role of <user id>, hiding log content: <error> | The caller's custom role could not be loaded, so prompts, responses and tool arguments were hidden for that read. | None if rare. If it repeats, check the database. See data access governance. |
| WARNING | Could not resolve audit log callback: <name> | A name in audit_log_callbacks is unknown. | Fix the name. |
| ERROR | Failed dispatching audit log to callback: <error>, Audit log callback task failed: <error> | A destination rejected a row. The row is still in the database. | Check the destination's credentials. |
| WARNING | Audit webhook: delivery to <url> failed: <error>, Audit webhook: <url> responded with status <code> | One delivery attempt failed and will be retried. | None if rare. |
| ERROR | Audit webhook: giving up on batch of <n> events after retries | Every retry failed. The batch waits for the next flush, up to max_queue_size rows. | Check the receiver. |
Policy and guardrail lines
These lines come from guardrail policies, audit mode and policy replay and the request inspector.
| Level | Line | Meaning | Action |
|---|
| DEBUG | Policy engine: audit policies [<names>] run <n> detect only pipeline(s) | The request matched audit attachments and that many audit pipelines run beside it. Nothing is blocked by them. | None. Set SPANWAY_LOG=DEBUG to see it. |
| WARNING | Pipeline: guardrail '<name>' not found in callbacks | A policy names a guardrail that is not loaded. An audit attachment or a replay records an error verdict for it and the request goes through. | Create the guardrail, or remove it from the policy. |
| ERROR | Pipeline: unexpected error from guardrail '<name>': <error> | An audited, replayed or dry run guardrail failed with something other than a block, for example a timeout. The verdict is counted as errored. | Check the guardrail's provider and credentials. |
| WARNING | Rollback failed for guardrail '<id>': <error> | A refused guardrail create left its row behind. | Delete the guardrail on the Guardrails page. |
| WARNING | Circular inheritance detected for policy '<name>' | A policy inherits in a loop. | Fix inherit. |
| ERROR | Custom code guardrail '<name>' exceeded its <n>s execution timeout | A custom code guardrail ran too long and the request failed. The same exists for execution error. | Fix the function or raise timeout. |
| WARNING | Custom code guardrail '<name>': Unknown action '<action>'. Treating as allow. | A custom code guardrail returned no valid decision, so the content went through. The same exists for Expected dict result. | Fix the function's return value. |
| ERROR | Generic Guardrail API: failed to make request: <error> | A generic guardrail API service failed and the request was refused. | Check the service. |
| CRITICAL | Generic Guardrail API error (fail-open). Proceeding without guardrail. ... | The service failed and the request went through unchecked. | Check the service, traffic is not being checked. |
| WARNING | Presidio analyzer <reason>, returning empty list | Presidio gave a bad answer and nothing protective is configured, so the text went through unmasked. | Check the Presidio services. |
| ERROR | Skipping guardrail '<name>': invalid configuration, proxy is starting WITHOUT this guardrail: <reason> | A guardrail in config.yaml names an unknown provider or has invalid fields, so the gateway started without it, see guardrail providers. | Fix the configuration and restart. |
| WARNING or ERROR | Provider specific, for example Akto unreachable (fail-open) or Akto unreachable (fail-closed) | A third-party guardrail service could not be reached. With fail open the request went through unchecked. | Check the provider's service, key and URL. |
| WARNING | ToolPolicyGuardrail: blocking tool(s) [<names>] (input_policy=blocked) | The tool_policy guardrail refused a request that lists or calls a blocked tool, see tool registry. | None, unless the block is a mistake. |
| WARNING | ToolPolicyGuardrail: trust chain violation ... | A tool whose input is trusted was asked to act on output from an untrusted tool, so the request was refused. | Review the tool's policies. |
| WARNING | ToolPolicyGuardrail: refusing tool(s) [<names>] because tool policies are not loaded from the database yet | The guardrail is on but this gateway has not loaded tool policies, so requests that carry tools get 503. | Check the database connection and that general_settings.supported_db_objects includes tools. |
| INFO | ToolPolicyRegistry: synced <n> tool policies ... | The in-memory tool policy registry reloaded from the database. Other gateways pick up a change at their next periodic sync. | None. |
| WARNING | Tool policy saved, but reloading the in-memory registry failed, so this gateway applies it at the next periodic sync: <error> | A tool policy change was stored and audited, but this gateway could not reload at once. | Check the database. The change applies at the next sync. |
| ERROR | tool_registry_writer <operation> error: <error> | A tool registry read or write failed. The route answers 500. | Check the database. |
Guardrails Monitor lines
These lines come from the daily rollup behind the Guardrails Monitor page. Requests are never affected, only the page's figures.
| Level | Line | Meaning | Action |
|---|
| WARNING | Spend tracking - guardrail usage tracking failed (non-fatal): <error> | The day's guardrail figures could not be updated for one batch of requests, so the page undercounts them. | Check the database when it repeats. |
| WARNING | Guardrail usage tracking failed (non-fatal): <error> | The same, from inside the rollup. | Check the database. |
| WARNING | Guardrail usage tracking: <rows> upsert failed for <key> after <n> retries; requeued for the next flush (non-fatal): <error> | A daily row could not be written and is retried with the next batch. | None unless it repeats. |
| WARNING | Guardrail usage tracking: <rows> upsert failed for <key> and is not safe to retry (non-fatal): <error> | A daily row was dropped, so that day undercounts. | Check the database. |
| WARNING | Guardrail usage tracking: pending <rows> requeue exceeds 10000 rows; dropping the <n> oldest (non-fatal) | The database was unreachable long enough that queued figures were dropped, so the page undercounts that period. | Fix the database connection. |
These lines come from server tools, web search interception and code interpreter interception. None of them carries the prompt or the search query.
| Level | Line | Meaning | Action |
|---|
| WARNING | server tool <name> failed: <error type> | One server tool call raised an error, and the model got a failed tool result. | Normal now and then, for example a page that times out. Investigate when it repeats. |
| WARNING | server tool loop failed: <error type> | The whole server tool loop failed, and the answer carries a server_tool_calls entry with status error. | Check the follow-up model call of that request in Logs. |
| INFO | guardrail withheld a <name> result: <error type> | A post_mcp_call guardrail blocked a tool result, so the model only saw a failed result naming the guardrail. | None, the guardrail is doing its job. |
| ERROR | WebSearchInterception: Search failed: <error type>, WebSearchInterception: Search <n> failed: <error type> or WebSearchInterception: Responses search failed: <error type> | One intercepted web search failed, and the model got a result block with an error code. The line names only the error type, so neither the search query nor the provider's error text reaches the log. | Normal now and then. When it repeats, test the search tool on Search Tools. |
| WARNING | Failed to reinitialize web search interception settings immediately: <error> | A saved web search interception change could not be applied on this instance at once. Every instance applies it at its next settings check, within about 10 seconds. | None if it happens once. Check the database when it repeats. |
| ERROR | CodeInterpreterInterception: failed to delete sandbox container | A sandbox was not deleted after a request, so it keeps running at the sandbox provider until the provider's own timeout. | Check the sandbox provider key and remove leftover sandboxes in its console. |
Container lines
These lines come from containers and the code interpreter tool on /v1/responses. A container without a recorded owner can only be reached by proxy admins.
| Level | Line | Meaning | Action |
|---|
| WARNING | Skipping container ownership tracking because prisma_client is None | The gateway has no database, so the new container has no owner. | Set DATABASE_URL. |
| WARNING | Skipping container ownership tracking because provider response has no id | The provider answered a container create without an id, so there is nothing to record. | Check the provider's answer in Logs. |
| ERROR | Container ownership recording failed after upstream create; returning response with untracked ownership: <error> | The container was created but its owner could not be stored. The caller got the container. | Check the database, then delete or reassign the container. |
| ERROR | Failed to record container ownership from responses output for container_id=<id>: <error> or Container ownership recording failed after responses call: <error> | A container the code interpreter created during /v1/responses could not be recorded. | Check the database. |
Dev mode lines
These lines come only from the spanway-ai-dev image, which runs the gateway with a built-in database for trying it on a laptop. Dev mode explains each one.
| Level | Line | Meaning | Action |
|---|
| Output | Spanway dev mode: the database runs inside this container and there is no Redis. Use it on a laptop to try the gateway, never for production or shared use. | Printed on every start of the dev image. | None. Use a real deployment for anything beyond a try. |
| Output | Spanway dev mode: created the embedded database in /var/lib/spanway/dev. | First start on a new volume. | None. |
| Output | Spanway dev mode: embedded database ready on 127.0.0.1:5432, starting the gateway. | The built-in database is up. | None. |
| Output | Spanway dev mode refused to start: <reason> | The dev image stopped before the gateway started. | See dev mode errors. |
| Output | Spanway dev mode: the embedded database stopped unexpectedly (exit <code>), stopping the gateway. | The built-in database stopped while the gateway ran. | Read the PostgreSQL line above it and start again. |
| Output | Spanway dev mode: stopped the gateway and the embedded database. | A normal stop. | None. |
Customer lines
These lines come from the customer routes. The create, update, delete, block and budget lines log only the error type, so customer ids and database messages stay out of the log.
| Level | Line | Meaning | Action |
|---|
| ERROR | Could not block customers: <error type> | /customer/block failed and the caller got a fixed 500 text. | Check the database, then retry. |
| ERROR | Could not create the customer budget: <error type> or Could not save the customer budget: <error type> | /customer/new or /customer/update could not save the customer's budget, so nothing changed. | Check the database, then retry. |
| ERROR | Could not create the customer: <error type>, Could not update the customer: <error type> or Could not delete the customers: <error type> | The route failed for a reason the gateway did not expect, and the caller got a fixed 500 text. | Check the database, then retry. |
| ERROR | ...customer_endpoints.end_user_info(): Exception occured - <reason> or ...list_end_user(): Exception occured - <reason> | A customer read or list call failed. | Read the reason, usually the database, then retry. |
| WARNING | object_permission still in new_end_user_obj after _set_object_permission or object_permission still in update_end_user_table_data | The customer's MCP or vector store grants could not be stored separately, so the customer was saved without them. | Send object_permission again with /customer/update. |
Key security lines
These lines come from leaked key reports and key expiry.
| Level | Line | Meaning | Action |
|---|
| WARNING | compromised key report: blocked virtual key alias=<alias> team=<team> source=<source> reporter_ip=<address> | A report matched an active key and the key is now blocked. On a gateway without audit logging this line is the only record of the block. | Tell the key's owner, and create a replacement key. |
| WARNING | compromised key report: owner of key alias <alias> not emailed (<reason>) | The key was blocked but no owner email went out. | Tell the owner yourself, or set up email. |
| ERROR | compromised key report: alert failed: <error>, compromised key report: owner email for key alias <alias> failed: <error> | The key was blocked but the alert or the email could not be sent. | Check the alerting or email settings. |
| ERROR | key hygiene: expiry notice for key alias <alias> failed: <error> | The expiry email for one key was not sent. User email not found means the key's owner has no email address. The next hourly run tries again. | Give the user an email address, or check the email provider. |
Database lines
| Level | Line | Meaning | Action |
|---|
| INFO | _db_health_readiness_check: reconnect succeeded | The database came back after a failure. | None. |
| ERROR | _db_health_readiness_check: reconnect failed | The gateway still cannot reach the database. Requests fail or run degraded depending on allow_requests_on_db_unavailable. | Restore the database. |
| INFO | Starting prisma migration job (use_migrate=..., use_v2_resolver=...), Migration job completed successfully. | The migrations-job role of the images started and finished. | None. |
| ERROR | DATABASE_URL is not set and could not be assembled from the DATABASE_* env vars, so migrations cannot run., Migration job failed after retries. | The migrations job could not run or could not apply the migrations. | See image errors. |
MCP lines
These come from the MCP gateway, MCP tool search and the hosted admin MCP server.
| Level | Line | Meaning | Action |
|---|
| WARNING | mcp_tool_search settings are invalid, the virtual tools return the error: ... | spanway_settings.mcp_tool_search or a stored key or team override failed validation, so searches for the affected keys return the error text. | Fix the value the line names. Controlled by spanway_settings.mcp_tool_search and the key or team object_permission. |
| INFO | mcp_tool_call asked for <name>, which the key cannot see | The model named a tool outside the key's catalogue. | None while it is rare. If it repeats on every request, grant the server to the key. |
| WARNING | MCP auto-execute hit MAX_MCP_TOOL_CALL_ROUNDS=5; forcing a text-only follow-up. | The model was still calling tools after five rounds, so the last follow-up was sent without tools. | None for hard questions. If it happens on every request, check the tool results. |
| DEBUG | mcp_tool_search on chat returned <n> of <m> tools | How many of the key's tools one search returned. | None. Useful when tuning top_k and the threshold. |
| ERROR | Hosted admin MCP audit row was not written: <ExceptionType> | An admin MCP tool call finished but its audit row could not be written, usually because the database was unavailable. | Check the database, and treat the gap in the audit log as lost. |
| ERROR | Hosted admin MCP could not read team or organization allowlists: <ExceptionType> | An OAuth session to the admin MCP server could not be checked against allowed_ips and was refused with 503. | Check the database and retry. |
| WARNING | mcp_client_id_header is not a string (...); ignoring it | The setting that names the MCP client header is malformed, so audit rows fall back to the User-Agent. | Set general_settings.mcp_client_id_header to a header name. |
| WARNING | mcp_allowed_clients is not a list of {alias, value} entries (...) | The client alias list is malformed. | Fix general_settings.mcp_allowed_clients. |
| WARNING | MCP server '<name>' sets catalog_entry '<entry>', which names no connector in the MCP catalogue, so it serves only the tools listed in enabled_write_tools. Fix the name or remove catalog_entry. | A config.yaml MCP server names a connector that does not exist, see connector catalogue. | Fix the name. |
| ERROR | MCP server <id> created but in-memory registry refresh failed: <error> | A server was saved but this gateway has not loaded it yet, see MCP gateway. | None unless it repeats. |
| WARNING | Rejected MCP request from a disallowed client application: <details> | A client not in mcp_allowed_clients was refused with 403. | Add the client if it should connect. |
| WARNING | MCP server '<name>' will not start: stdio MCP servers are disabled ... | A stdio server is configured while SPANWAY_ENABLE_MCP_STDIO is off. | Turn stdio on, or remove the server. |
| INFO | Loading OpenAPI spec from <path> for server <name> | An OpenAPI server is building its tools. | None. |
| ERROR | Unexpected error in MCP tool call: <error> | A REST tool call failed inside the gateway and the caller got 500. | Fix what the line names. |
| WARNING | MCP elicitation: downstream relay failed | A server's question could not be relayed to the client, see elicitation. | None if it is rare. |
| INFO | MCP skills: served <what> to user <user id>, team <team id> | A key listed skills or read a skill entry or file over /mcp, see skills over MCP. | None. |
| WARNING | MCP skills: the skills table could not be read, so no skills are served: <ExceptionType> | The skills query failed, so the skills methods answered empty and server/discover left the extension out, see skills over MCP. | Check the database and migrations. |
| DEBUG | MCP skills: skill <id> is not served over MCP because <reason> | A stored skill was left out of skills/list or refused by skills/get, for example because its SKILL.md has no description, see skills over MCP. | None, or fix the skill's upload if it should be served. |
| INFO | MCP list_tools: <server> has no per-user credential for this caller; serving its connect tool | A person who has not connected to a per-user sign-in server yet listed tools, so they got the <server>-connect tool instead of the server's tools, see lazy authentication. | Normal before a person connects. |
| INFO | MCP list_tools: upstream <server> rejected the stored per-user credential (HTTP 401); serving its connect tool | The person's stored token no longer works on the server, so they got the connect tool to sign in again, see lazy authentication. | None for one person. When many people hit it at once, the OAuth client or the server's sign-in settings changed, check them. |
| INFO | MCPJWTSigner: auto-generated RSA-2048 keypair (set MCP_JWT_SIGNING_KEY to use your own key) | The JWT signer made a new key at start, so earlier tokens stop verifying. | Set MCP_JWT_SIGNING_KEY in production. |
MCP credential lines
| Level | Line | Meaning | Action |
|---|
| ERROR | byok_token: failed to store user credential for user=<user> server=<server>: <error> | A key entered on the bring your own key connect page could not be saved, so no token was issued. | Check the database. |
| INFO | MCP server <id>: URL changed, cleared <n> stored per-user env var or BYOK row(s) | An admin changed a server's URL, so users' stored values for the old address were removed. | None. Users enter them again. |
| WARNING | OAuth credential storage not authorized for user=<user> server=<server> | An upstream token arrived for someone who may not use the server and was not stored, see MCP OAuth. | None unless that person should have access. |
| WARNING | exchange_token_with_server: could not resolve a Spanway user_id ... was NOT stored | The gateway could not tell who finished the sign-in, so the token was dropped. | Ask the person to sign in to the gateway and connect again. |
MCP write action alignment lines
These lines come from the Spanway Proxy logger. They name the guardrail, the tool and a category or reason, never the user's request, the agent's purpose or the tool arguments.
| Level | Line | Meaning | Action |
|---|
| WARNING | mcp_write_alignment guardrail <name> found tool <tool> misaligned (<category>), call <outcome> | The write action alignment judge said a write did not match the request or the agent's purpose. outcome is blocked, sent_for_approval or logged. | Look at the call in Logs. Many lines for one agent can mean a prompt injection or a wrong purpose. |
| WARNING | mcp_write_alignment guardrail <name> could not check tool <tool> (<reason>), call <outcome> | The judge timed out, failed or answered unclearly. The call was blocked, or only logged when the guardrail runs in log mode. | Check the judge model. Repeated lines mean every write is being refused. |
| WARNING | mcp_write_alignment guardrail <name>: judge call failed (<error type>) | The call to the judge model raised an error, which leads to the line above with judge_error. | Check the judge model's deployment and keys. |
Human approval lines
| Level | Line | Meaning | Action |
|---|
| WARNING | approval check for MCP tool <tool> failed: <error> | The approval policies could not be read for a tool call, which was refused with 503. | Check the database. |
| WARNING | approval gate for workflow step <step> failed: <error> | The same for a workflow step. | Check the database. |
| WARNING | approval sweep failed: <error> | The 15 second expiry and escalation sweep failed on this pass. | None if rare, otherwise check the database. |
| INFO | approval sweep expired <n> and escalated <m> | The sweep closed and escalated requests. | None. |
| WARNING | approval <id> links were not sent: <error> | Approve and reject links could not be delivered. | Check the alerting and email settings. |
| WARNING | expired approval link opened by <user> or invalid approval link opened by <user> | Someone used an old or changed approval link. | Look into it only if it repeats. |
Environment lines
| Level | Line | Meaning | Action |
|---|
| DEBUG | environment secret reference could not be resolved: <ExceptionType> | While planning, a secret reference could not be read on this gateway, see environments. | Define the secret on the gateway. |
Memory lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Error creating memory: <error>, Error listing memory: <error>, Error upserting memory: <error>, Error deleting memory: <error> | A memory database call failed and the caller got 500. | Check the database. |
| ERROR | Error loading team for write-auth check (team_id=<id>): <error> | The team could not be read to decide a write, which was refused. | Check the database. |
| INFO | Deleted <n> expired memory rows | The retention job removed old entries. | None. |
Prompt management lines
These lines come from the prompt routes.
| Level | Line | Meaning | Action |
|---|
| ERROR | Error creating prompt: <error>, Error updating prompt: <error>, Error patching prompt: <error>, Error deleting prompt: <error> | A prompt write failed and the route answered 500. Nothing was saved. | Check the database, then retry. |
| ERROR | Error testing prompt: <error> | The Prompt Studio test call failed. | Check the model and its credentials. |
| INFO | prompt operations settings changed by <user>: protected=<environments> require_eval_verdict=<true or false> | An admin saved the prompt protection settings. | None. The audit log holds the values before and after. |
| INFO | prompt partial <name> deleted by <user> (<n> versions) | An admin deleted a partial. | None. |
| INFO | prompt git sync <name> pulled into <environment>: <n> created, <n> updated, <n> skipped | A Git pull finished. | Look at skipped in the answer when the count is not 0. |
| INFO | prompt change email for <id> not sent: no email callback is configured | Prompt alert emails are set up but no email provider is. | Configure an email provider, or clear the email list. |
| ERROR | prompt change alert failed for <id>: <error>, prompt change email failed for <id>: <error>, prompt change notification failed: <error> | The prompt change was saved, but its alert or email could not be sent. | Check the alert destination or email provider. |
| WARNING | prompt partials sync failed, keeping the loaded partials: <error> | The periodic database read of partials failed, so this gateway keeps rendering the partials it already had. | Check the database connection. |
Rate limit lines
| Level | Line | Meaning | Action |
|---|
| ERROR | PREMIUM FEATURE: Reserving tpm/rpm by priority is a premium feature. ... | priority_reservation is set without a licence, so the priority pools are ignored and every key uses default_priority. | Add the licence, see rate limits. |
| ERROR | Dynamic rate limiter: OVER_LIMIT response with unknown descriptor_key(s) | The dynamic limiter refused a request for a reason it could not name. | Report it with the line. |
| WARNING | Ignoring metadata.model_max_parallel_requests: expected a map of name to a whole number of 0 or more | A model concurrency map on a key or team has the wrong shape and is not applied. | Fix the metadata. |
Headroom compression lines
| Level | Line | Meaning | Action |
|---|
| CRITICAL | Headroom: <error>; fail_open configured, forwarding request uncompressed. status_code=<n> | Headroom could not compress a request, so it went to the model at full size. Normal during a Headroom outage when unreachable_fallback is fail_open. | Fix Headroom. Requests keep working at full cost meanwhile. |
| WARNING | Headroom: ignoring unusable timeout <value>, using 60.0 seconds | The guardrail's timeout is zero, negative or not a number. | Set timeout to a positive number of seconds. |
| WARNING | Headroom: retrieve failed for hash=<hash>: <error> or Headroom: retrieve returned <status> for hash=<hash> | The model asked for compressed content and Headroom could not return it, so the model got a short notice instead. | Check Headroom. One line now and then is normal when cached content expires. |
| WARNING | Headroom CCR: rejecting hash=<hash> not produced by current request compression | The model asked for content that this conversation never compressed, so the gateway refused to fetch it. | None, this protects other conversations' content. |
Spend and usage rollup lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Spend tracking - database out of connections or rollup row lock timed out during model usage flush, requeued <n> model usage transactions for the next flush: <error> | The Model Leaderboard rollup could not be written this time and will be retried, so new usage shows a little later. | None when rare. When it repeats on every flush, add database connections or raise SPEND_ROLLUP_LOCK_TIMEOUT_MS. |
| ERROR | Spend tracking - model usage flush failed; <n> model usage transactions dropped: <error> | That usage is lost from the leaderboard. Spend logs and budgets are not affected. | Check the database. |
Budget lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Unrecognized budget_duration '<value>'; falling back to a next-midnight reset. ... | A stored budget has a reset period the gateway cannot read, so it resets every midnight. | Set a valid budget_duration, such as 30d. |
| WARNING | general_settings.<setting>=<value> is not a boolean, keeping the fail-closed default | fail_closed_budget_enforcement or a similar switch is not true or false, so the safe default stays. | Fix the value. |
| WARNING | Failed to evict the team member default budget cache | A budget change was saved, but the cached copy was not cleared, so members may see the old limit for up to the cache lifetime. | Check Redis. |
| DEBUG | Crossed Soft Budget for token <id>, spend <n>, soft_budget <n> | A key, team or project passed its soft budget. The alert, when alerting is on, goes out separately. | None. |
| WARNING | budget tier shift: <team or organization> <id> moved from <tier> to <tier> at <n>% budget used | A budget tier policy moved a team or organization to another tier, down as spend crossed a shift or back up after a budget reset. It is written once per shift, by the replica that recorded it. | None. It is the expected result of the policy. Check the budget if it happens sooner than planned. |
| ERROR | budget tier shift alert failed for <id>: <error> | The shift is saved and audited, but the Budget Tier Shift alert could not be sent. | Check the alerting destination. |
| ERROR | budget tier shift could not be recorded: <error> | The database refused the shift write, so no audit row or alert was written. Requests are still served on the new tier. | Check the database. The next request after it recovers records the shift. |
| WARNING | Could not register the budget tier shift metric: <error> | The spanway_budget_tier_shifts_total Prometheus counter is missing on this replica. Shifts still work. | Shifts still work. Check that metrics are turned on for this replica, or ignore it if you do not scrape metrics. |
Alerts inbox lines
| Level | Line | Meaning | Action |
|---|
| INFO | Usage anomaly scan for <day>: <n> flags, <n> new alerts, <n> old resolved alerts removed | The hourly or manual usage anomaly scan finished. | None. |
| WARNING | Usage anomaly scan failed, the next scheduled run retries: <error> | The scan could not read the daily rollup or write the inbox. | Check the database if it repeats. |
| WARNING | general_settings.usage_anomalies is invalid, using the defaults: <error> | A value in usage_anomalies is out of range or of the wrong type. Unknown keys are ignored. | Fix the value the error names. |
| INFO | Online eval rule <rule_id> regressed: <n> series, <n> new alerts in the alerts inbox | An online eval rule's pass rate dropped and its regressed series were written to the inbox. | Work the alert in Alerts Inbox. |
| WARNING | Online eval rule <rule_id> regressed but the alert could not be sent: <error type> | The regression is in the inbox, but the Slack, email or webhook message failed. | Check the alerting settings and the receiving channel. |
| WARNING | Online eval rule <rule_id> could not be checked for a regression: <error type> | Reading this rule's scores or writing its inbox alert failed. The other rules were still checked. | Check the database if it repeats. |
See alerts inbox logs and online evals logs.
Skill scanning lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Skill scan refused a <skill or plugin> (scan <id>, status <status>, <n> files) | A guardrail blocked an upload or change, or a file could not be checked while scanning fails closed. Nothing was stored. | Read the scan under Skill scan results on the Skills page. |
| WARNING | Skill scan could not check every file of a <skill or plugin> and fail open mode let it through (scan <id>) | skill_scan_mode is fail_open and an unchecked skill or plugin was stored. | Review the scan and fix the file or the guardrail service. |
| WARNING | Skill scanning settings cannot be read, so every skill and plugin is refused until they are fixed: <setting names> | skill_scan_mode or skill_scan_guardrails holds a value the gateway cannot read, so scanning fails closed. | Fix the value in the config file or on the Skills page. |
| WARNING | Refused a <method> to <path> through the Anthropic pass-through route, because skill changes there are scanned only as a multipart POST | A skill change through /anthropic/... was refused with skill_scan_unsupported. | Tell the caller to use POST /v1/skills or a multipart upload. |
| WARNING | Could not save the skill scan result <id>: <error> | The verdict was applied, but its row was not written. | Check the database. |
| WARNING | Could not remove the skill scan results of a deleted <skill or plugin>: <error> | The item was deleted and its old scan rows remain. | Check the database. The rows are harmless. |
| INFO | Skill scan of a <skill or plugin> finished with status <status> (scan <id>) | A scan passed, or no guardrail was set to check skills. | None. |
See skill scanning logs.
Query and Explore lines
| Level | Line | Meaning | Action |
|---|
| WARNING | general_settings.analytics_query is invalid, analytics stay off until it is fixed: <error> | A value in analytics_query is out of range, of the wrong type, or the block has an unknown key. Analytics are turned off until it is fixed, and every analytics route answers 403 disabled. | Fix the value the error names. |
See Query and Explore logs.
Health check lines
| Level | Line | Meaning | Action |
|---|
| INFO | background_health_check_loop_started interval_seconds=... | Background health checks started. | None. |
| WARNING | background_health_check_cycle_duration_exceeded_interval cycle_id=... duration_ms=... | One cycle took longer than health_check_interval. | Raise the interval or health_check_concurrency. |
| WARNING | Failed to save background health checks to database: ... | Results were not stored, so /health/latest shows older rows. | Check the database. |
| WARNING | Refused /health/drain because no drain token is set. ... | A drain call arrived while no token is configured. | Set drain_endpoint_token or DRAIN_ENDPOINT_TOKEN. |
| ERROR | Error in shared health check, falling back to direct health check: ... | Redis did not answer, so this replica checked every deployment itself. | Check Redis. |
| ERROR | Spanway Redis Cache PING: - Got exception from REDIS : ... | The readiness probe could not ping the shared Redis and reports "coordination_redis": "error". The probe still answers 200. | Check Redis. |
See health check logs for every line.
Fallback and cooldown lines
| Level | Line | Meaning | Action |
|---|
| INFO | Fallback configured: <model> -> [<models>] (type: general) or Fallback deleted: <model> (type: general) | A fallback list changed through the API. | None. |
| ERROR | Error creating fallback: ... or Error deleting fallback: ... | The change was not saved. | Read the cause, usually the database. |
| WARNING | allowed_fails counter fell back to this worker's in-memory count: ... | Redis did not answer, so failures are counted per replica. | Check the coordination Redis. |
App trace upload lines
| Level | Line | Meaning | Action |
|---|
| ERROR | OTLP upload relay refused by Lens: SPANWAY_LENS_SERVICE_TOKEN does not match Lens | Lens rejected the gateway's service token, so no app trace upload is stored. | Set the same SPANWAY_LENS_SERVICE_TOKEN on the gateway and Lens. |
| WARNING | OTLP upload relay failed: Lens answered HTTP <status>; the caller was asked to retry | Lens failed on an upload and the app was told to retry. | Check the Lens log if it repeats. |
| WARNING | OTLP upload relay failed: Lens did not answer (<error class>); the caller was asked to retry | Lens could not be reached. | Check that Lens runs and SPANWAY_LENS_URL is right. |
| Level | Line | Meaning | Action |
|---|
| INFO | trace comments: deleted <n> comments older than the <days> day agent trace retention | The hourly job deleted trace comments older than AGENT_TRACING_RETENTION_DAYS, because Lens no longer keeps their runs. Normal. | None. Set AGENT_TRACING_RETENTION_DAYS on the gateway to the same value as on Lens. |
Logging pressure lines
| Level | Line | Meaning | Action |
|---|
| WARNING | LoggingWorker: logging queue holds <n> of <size> records, entering degraded mode. Only 1 in <k> records goes to trace and analytics destinations until it drains below <m> | A logging destination is falling behind, so the gateway started sampling trace and analytics destinations. Spend, budgets and rate limits keep every record. | Find the slow destination. Requests are not slowed. See logging under load. |
| INFO | LoggingWorker: logging queue drained to <n> of <size> records, leaving degraded mode | Full logging resumed. | None. |
| WARNING | LoggingWorker: logging queue is full (<size> records), new log records go to usage tracking only until it drains. Requests are not slowed. Raise LOGGING_WORKER_MAX_QUEUE_SIZE or fix the slow logging destination | The queue is full, so new log records run at once for usage accounting only and skip trace and analytics destinations. Spend, budgets and rate limits still count them. Written once per episode. | Fix or remove the slow destination, or raise the queue size. |
| WARNING | Logging degraded: <d> log record(s) dropped and <s> sent to usage tracking only since the last check, queue at <n> of <size>. Requests are not slowed | The 10 second summary while sampling or dropping goes on. | Same as above. |
| WARNING | spanway logging executor backlog is full (max_pending_tasks=<n>); dropped <d> logging task(s) since the last warning. Set LOGGING_EXECUTOR_MAX_PENDING_TASKS to raise the cap. | The pool for older blocking logging destinations is full and drops new jobs. | Fix the slow destination, or raise the cap. |
| WARNING | Logging pressure check failed: <error> | One 10 second pressure check failed and is retried on the next one. | None if rare. |
Response cache lines
| Level | Line | Meaning | Action |
|---|
| INFO | Cache settings initialized from database | A replica loaded saved cache settings. | None. |
| WARNING | CLIENT LIST command failed (likely restricted on managed Redis): ... | A managed Redis refuses the client list. | None. |
| WARNING | Failed to write cache-settings audit log: ... | A cache settings save worked but its audit row was not written. | Check the database. |
| ERROR | Error testing cache connection: ... | Test Connection failed. | Read the reason in the answer. |
| ERROR | Cache health check failed | /cache/ping could not reach the cache. | Check the connection settings. |
Data policy lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Deployment <model> declares malformed data terms <fields>, so they count as undeclared | A config.yaml deployment has a term outside the allowed values. | Fix the value. |
| WARNING | ignoring invalid required_model_region='<value>' | The compliance report could not read the required region. | Set a valid region. |
Prompt caching lines
| Level | Line | Meaning | Action |
|---|
| WARNING | AnthropicCacheControlHook: Reached the provider limit of 4 cache breakpoints. Skipping further injection. | The request already had the most breakpoints a provider accepts. | None. |
| WARNING | AnthropicCacheControlHook: Provided index <n> is out of bounds for message list of length <m>. ... | An injection point's index points past the conversation. | Fix the index. |
Cost optimization lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Auto router routing test failed. Due to error - <error> | The test call on the Auto-Router tab failed. | Read the error, usually a model or key problem of the router. |
Pricing and cost tracking lines
| Level | Line | Meaning | Action |
|---|
| INFO | Updated cost_discount_config: <values>, Updated cost_margin_config: <values>, Updated block_requests_for_models_without_pricing: <value> | An admin saved a cost tracking setting. | None. |
| ERROR | Error fetching cost discount config: <reason> or Error fetching cost margin config: <reason> | The stored values could not be read and the caller got a 500. | Check the database. |
| INFO | Model cost map reloaded successfully in current pod. Models count: <n> | A manual price reload took effect. | None. |
| ERROR | Failed to reload model cost map: <reason> | A reload failed and the old prices stay in use. | Check the URL and the digest. |
| Level | Line | Meaning | Action |
|---|
| ERROR | Error creating tag: <reason> or Error updating tag: <reason> | A tag could not be saved. | Check the database. |
| ERROR | Error adding tag to deployment: <reason> | A deployment could not be tagged. | Add the tag on the deployment's Tags field. |
| INFO | Tag <name> not added to deployment <id>: it is defined in config.yaml, set its tags there | A chosen deployment comes from config.yaml. | Add the tag in config.yaml. |
| WARNING | tag_regex: invalid pattern '<pattern>', skipping it | A deployment's tag_regex is not a valid regular expression. | Fix the pattern. |
AI hub and public catalogue lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Error aggregating public catalogue traffic: <error> | The catalogue could not read request statistics, so it answers with prices and limits only and p50, p95, error rate and request count are null. | Check the database. The catalogue keeps answering meanwhile. |
| ERROR | ...public_model_hub_list(): Exception occured - <error> or ...public_model_hub_facet(): Exception occured - <error> | The paged hub list or a filter list failed and the caller got 500. | Read the error, usually the router or the database. |
| ERROR | Could not list the published skills: <error> | The skill hub could not read the skills table and answered 500. | Check the database. |
| ERROR | Error updating useful links: <error> or Error making MCP servers public: <error> | A publish change could not be saved. | Check the database and retry. |
Model management lines
| Level | Line | Meaning | Action |
|---|
| ERROR | spanway.proxy.proxy_server.update_model(): Exception occured - <reason> | /model/update failed. | Read the reason. |
| ERROR | Error in patch_model: <reason> | A partial edit or a pause failed. | Read the reason. |
| ERROR | Error in model <id>: <reason> | Block or unblock failed. | Check the id and the database. |
| ERROR | Error updating public model groups | Saving the AI hub list or links failed. | Check the database. |
Credential lines
| Level | Line | Meaning | Action |
|---|
| WARNING | invalidate_user_provider_credential_cache: Redis tombstone failed | A disconnect could not clear the cached token, so the connection was kept. | Check Redis and disconnect again. |
| WARNING | set_user_provider_credential_cache: Redis set failed; falling back to delete | A new connection could not be cached. | None during a short Redis outage. |
| WARNING | aget_user_provider_tokens: Redis get failed; falling back to the database | The token was read from the database. | None during a short Redis outage. |
| ERROR | _purge_user_connections_for_credential: failed to drop user connections for <name> | Connections under a deleted credential were not removed. | Check the database. |
| WARNING | scan: <location> unavailable: <reason> | The encryption check or migration could not read a location and answered 503. | Fix the database and run again. |
| WARNING | Skipping <table> row <id> callback_vars (transform failed): <reason> | One row's callback secrets were left as they were. | Re-enter them. |
| ERROR | Failed to re-encrypt credential <name>: <reason> | A master key rotation could not rewrite one credential. | Re-enter the credential. |
Spend report and export lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Daily activity export failed: <reason> | A daily activity download failed. | Check the database. |
| ERROR | Daily activity aggregation failed: <reason>, Daily activity key page failed: <reason>, Daily activity key search failed: <reason>, Daily activity model top keys failed: <reason>, Daily activity user page failed: <reason> or Daily activity cache leakage keys failed: <reason> | A usage chart query behind the Usage page or a user, team or customer view failed and the caller got Failed to fetch analytics. The gateway log has the cause. | Read the reason, usually the database. |
| INFO | Spend capture-rate check: <result> | The daily capture rate check ran. | None. Act on the alert when the rate is low. |
| INFO | Spend capture-rate check: another pod alerted this window | Another instance sent this alert. | None. |
| WARNING | Spend capture-rate check: could not read the lock: <reason> | Redis could not be read, so this instance alerted on its own. | Check Redis. |
| ERROR | AI usage chat failed: <reason> | An Ask AI answer failed, and the panel showed a generic error. | Read the reason, usually the model or its credentials. |
| ERROR | Tool <name> failed: <reason> | One usage lookup behind Ask AI failed. | Check the database. |
| INFO | CloudZero export completed successfully or Vantage export completed successfully | A manual cost export finished. | None. |
| ERROR | Error performing Vantage export: <reason> | A Vantage export failed. | Check the Vantage key and token. |
Website assistant lines
These come from the website assistant, the chat box that answers visitors from your published docs. They only appear when public_assistant is on, and the index lines come from the index build task.
| Level | Line | Meaning | Action |
|---|
| INFO | public_assistant index swapped to version <version> | A gateway loaded a newly published docs index. | None. |
| WARNING | public_assistant index swap refused, keeping the previous index: <reason> | A published index failed its checksum or validation, or could not be downloaded. The previous index keeps serving. | Rebuild and publish the index. |
| WARNING | public_assistant index first load timed out | The first index download took longer than 10 seconds. Chat answers 503 not_ready until the next check finishes it. | Check the gateway's access to public_assistant_index_bucket if it keeps happening. |
| WARNING | public_assistant is on but trusted_proxy_ranges is not set, ... | The gateway cannot tell visitors apart, so both assistant routes answer 503 unavailable. Logged once per process. | Set trusted_proxy_ranges, see website assistant step 3. |
| WARNING | public_assistant admission counters are unreachable, refusing chat turns (<error class>: <message>) | Redis is down, so the gateway cannot count visitors. Chat turns answer 503 unavailable until Redis is back. The brackets name the Redis error, for example (ConnectionError: Connection refused). | Restore Redis. |
| WARNING | public_assistant admission counters are unreachable, search is not limited (<error class>: <message>) | Redis is down. Search keeps answering without its per address limit. | Restore Redis. |
| WARNING | public_assistant could not record a decline, counters are unreachable (<error class>: <message>) | Redis is down, so a declined question did not count towards the visitor's pause. | Restore Redis. |
| WARNING | public_assistant turn failed, answering unavailable: kind=<kind> loopback_status=<status> | A chat turn answered 503 unavailable because the model call failed. kind is quota (the gateway refused the assistant key with 400, 401, 403, 422 or 429, where 422 is a spent budget), error (any other failure), timeout (one model call took over 15 seconds) or turn_timeout (the whole turn took over 30 seconds). loopback_status is the HTTP status the gateway answered the assistant's internal call with, or none when there was no answer. | See website assistant logs. |
| INFO | public_assistant index <version> unchanged | The build found the same corpus as the published index, so it published and embedded nothing. | None. |
| INFO | public_assistant index <version> published: ... and public_assistant index current: version <version> | The index build published a new index, or confirmed the current one is up to date. | None. On AWS the stale index alarm counts the second line. |
| ERROR | public_assistant index build needs SPANWAY_ASSISTANT_DOCS_SOURCE, SPANWAY_ASSISTANT_WEBSITE_SOURCE and SPANWAY_ASSISTANT_INDEX_BUCKET | The build task started without its sources or target. | Set the three environment variables on the task. |
| ERROR | public_assistant index not published: golden hit rate <rate> below 0.90 | The new index found the right page for too few known questions, so nothing was published. | Check the docs build, then rebuild. |
| ERROR | public_assistant index not published: <n> embedding tokens exceed the run cap | The build would have embedded more than its token cap, so it stopped before spending anything. | Look for a runaway page or a large corpus change. |
| ERROR | public_assistant index not published: no pages found in the site sources | The docs or website source was empty or unreadable. | Check the bucket names and the task's read access. |
| ERROR | public_assistant index not published: the manifest changed during two attempts | Another build published at the same time, twice. | Run the build again once the other one has finished. |
Access request lines
| Level | Line | Meaning | Action |
|---|
| WARNING | access request <request_id>: requester notification failed: <error> | The email telling a requester that their access request was approved or rejected could not be sent. The decision itself was saved. | Check the email settings. Nothing to do for the request. |
| WARNING | access request <request_id>: approver alert failed: <error> | The access_request_created notice to approvers could not be sent. The request was saved and waits in the review queue. | Check the alerting destination, for example the Slack webhook URL. |
| WARNING | access request <request_id>: the raise ran out but the old limits could not be restored, retrying: <error> | A temporary raise ran out but putting the old limit back failed, so the raise is still in place. | Normal during a short database outage, the job retries every 5 minutes. If it repeats, read the error and set the limit by hand. |
| WARNING | access request <request_id>: the raise ran out but the expiry job failed on it, retrying: <error type>: <error> | Something unexpected, such as a database error, stopped a temporary raise from being put back. Only that request is skipped and the rest of the run goes on. | The job retries on the next run. If it repeats for the same request, read the error and set the limit by hand. |
| WARNING | access request <request_id>: could not postpone the expiry retry: <error> | The expiry job could not move a failed request to the back of its queue, usually because the database is unreachable. | Nothing to do once the database is back. |
| INFO | access request expiry: <n> temporary raise(s) ran out and were restored | One expiry run put the old limits back on <n> keys or teams. No request text is logged. | Normal, nothing to do. |
Cloud signup lines
Written by a Spanway Cloud gateway when a signup chooses a data region this gateway does not serve. Neither line carries the email address or any other signup field.
| Level | Line | Meaning | Action |
|---|
| INFO | cloud: signup for region <region> pointed at <signup_url>, nothing stored | A signup chose another region and was answered 421 with that region's signup page. | None. Many in a row can mean a page links to the wrong region's signup. |
| INFO | cloud: signup refused, region <region> is not offered | A signup named a region no gateway offers and was answered 400. | None for a hand-written request. When customers hit it, add the region to general_settings.cloud.region_signup_urls. |
Cloud billing safety lines
Written by a Spanway Cloud gateway when it cannot price or meter usage, see Billing safety. The reasons name config fields and rules, never their values, and no line carries a Stripe key.
| Level | Line | Meaning | Action |
|---|
| ERROR | cloud: refusing Cloud tenant requests, general_settings.cloud is invalid so usage cannot be priced: <reason> | Tenant requests answer 503 cloud_billing_unavailable. Logged once an hour with one High budget_alerts alert. | Fix the key the reason names. |
| ERROR | cloud: credit settlement skipped, general_settings.cloud is invalid: <reason> | The daily settlement wrote nothing and sent one High alert. | Fix the key, and the next run settles up to seven missed days. |
| ERROR | cloud: overage metering is paused (<reason>) for price <price_id>: <detail>. ... | Overage is held back because overage_price_id is unset, the Stripe price is not one cent per unit, or Stripe could not be asked. Requests keep working. | Fix the price or the setting. Held overage is sent by the next settlement. |
| WARNING | cloud: tenant lookup for organization <id> failed: <error> | While the block is invalid, a tenant lookup failed and the request was refused to be safe. | Check the database. |
| WARNING | cloud: billing alert could not be sent: <error> | One of the alerts above did not reach the alert channels. | Check the alerting setup. The log line above it still says what is wrong. |
| INFO | cloud: settled <n> tenant days, skipped <m> tenants | The daily settlement finished. | None. |
Data subject request lines
| Level | Line | Meaning | Action |
|---|
| INFO | cloud: erased closed workspace tenant=<tenant_id> users_erased=<n> users_refused=<n> end_users_erased=<n> end_users_refused=<n> keys=<n> request_logs=<n> files=<n> teams=<n> | The daily job erased a closed Cloud workspace. | None. When a refused count is above 0, look up the failed rows in the data subject request list. |
| INFO | cloud: another pod is erasing closed workspaces, skipping | Another replica holds the job lock. | None. |
Compliance lines
| Level | Line | Meaning | Action |
|---|
| INFO | compliance: stored scheduled evidence bundle <evidence_id> | compliance_evidence_interval stored a new evidence bundle. | None. |
| DEBUG | Compliance evidence exports are an Enterprise Feature. Skipping... | The interval is set but the license lacks compliance_evidence. | Add the feature or unset the interval. |
| INFO | Deleted <n> <table> rows in this batch | The retention cleanup removed expired rows. | None. |
| WARNING | Invalid <setting> value: <value> | A retention period is not a duration, so that table is not cleaned. | Fix the value, for example 90d. |
License lines
| Level | Line | Meaning | Action |
|---|
| INFO | License configured=<true or false> valid=<true or false> expires=<date> features=<n> fingerprint=<fingerprint> | The gateway read the license at startup, on a config load or on the hourly re-check. The key is never logged. | When configured=true valid=false, the key is invalid or expired, see Spanway Enterprise. |
| WARNING | License validity changed: valid=<true or false> | The hourly re-check found the license became valid or stopped being valid. | Renew the key when it says false. |
| ERROR | Cannot load the license public key from <path>: <error> | The bundled public key cannot be read, so no license verifies. | Use an unmodified image. |
| DEBUG | License rejected. error_type=<type> | Why the last key failed verification. | Turn on debug logging to read it. |
AWS Marketplace lines
These lines only appear with SPANWAY_MARKETPLACE_PROVIDER=aws. No listing is live yet, see AWS Marketplace (planned).
| Level | Line | Meaning | Action |
|---|
| ERROR | Spanway licence features are off because the aws marketplace entitlement could not be verified. <reason> | The entitlement check failed, which always happens until the listing exists. | Leave the provider unset and use a license key. |
| INFO | AWS Marketplace usage metering is on for product <code>: ... | A usage listing will send hourly usage records. | None. |
| INFO | AWS Marketplace usage record sent for product <code>: <n> units of 1000 requests for the hour starting <time>. | AWS accepted this hour's record. | None. |
| WARNING | AWS Marketplace usage record for product <code> failed with <error>. ... | The record was refused or AWS could not be reached. The count is kept for a later record. | Check the IAM role and the network path when it repeats. |
| ERROR | AWS Marketplace refused the usage record for product <code> with <error>, so the Spanway licence features are turned off ... | AWS said the account is not subscribed, the product code is wrong or the role may not meter. Licensed features are off until a later hourly record is accepted. | Check the subscription, the product code and the IAM role. |
| WARNING | AWS Marketplace usage metering stopped with <n> successful requests not reported. They are not billed. | The pod stopped with usage it could not report yet. | None. |
Sanctions lines
| Level | Line | Meaning | Action |
|---|
| WARNING | sanctions geofence refused <path> from <network> (<country> <subdivision>, rule <rule_id>) | The geofence refused one request with 451. | None, unless the network is your own. |
| ERROR | sanctions geofence: <problem> | A geofence setting did not validate, or no request can be located. | Fix the setting it names. |
| ERROR | sanctions geofence: invalid settings left it off: <detail> | Settings next to enabled: false did not validate. | Fix them before turning the geofence on. |
| ERROR | sanctions geofence: the jurisdiction policy is unreadable: <detail> | Every request answers 503 sanctions_policy_unreadable. | Fix policy_path or restore the file. |
| ERROR | sanctions screening: general_settings.sanctions_screening is invalid, so every screening setting uses its default: <detail> | The Cloud screening block was ignored. | Fix the key the detail names. |
| ERROR | sanctions: active list <version_id> is unreadable: <detail> | The stored list could not be decoded, screening keeps the list it had. | Run Refresh now. |
Evals lines
| Level | Line | Meaning | Action |
|---|
| INFO | evals: fired <n> scheduled run(s) | The schedule job started the runs that were due. | None. |
| WARNING | evals: schedule <id> disabled, <reason> | A schedule turned itself off. | Fix what the reason names and turn it on again, see Evals logs. |
| WARNING | evals: schedule <id> skipped, <reason> | One fire was skipped. | Look into it when it repeats. |
| WARNING | online scoring: rule refresh failed, keeping the last rules: <error> | A replica could not reload online rules. | Check the database. |
| WARNING | online scoring: judge spend counter failed for <rule_id>: <error> | A shared counter could not be updated. | Check Redis. |
| INFO | online scoring: backfill <id> of rule <rule_id> ended, <n> scored, <n> already scored, <n> unreadable, <cost> USD judge | A backfill finished or was cancelled. | None. |
| WARNING | online scoring: backfill <id> of rule <rule_id> failed: <error type> | A backfill stopped on an error, its record holds the full error. | Read the backfill's error, fix the cause and start it again, scored requests are skipped. |
Lens lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Lens content policy not sent, Lens keeps no span content: <error> | The gateway could not send Lens its content policy, so new spans lose their content and judged evals fail until it is sent. | Check that the gateway reaches the worker. It retries on its own. |
| WARNING | Lens content policy not built, Lens keeps no span content: <error> | The gateway could not read the data policies it sends. | Check the database. |
Organization lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Error adding member to organization: <ExceptionType> | POST /organization/member_add failed for a reason the gateway did not expect, and the caller got a 500. | Check the database, then retry. See organizations. |
| ERROR | Error updating member in organization: <ExceptionType> | PATCH /organization/member_update failed for a reason the gateway did not expect, and the caller got a fixed 500 text. Only the error type is logged, never the member's email. | Check the database, then retry. |
| ERROR | Error deleting member from organization: <ExceptionType> | DELETE /organization/member_delete failed for a reason the gateway did not expect, and the caller got a fixed 500 text. Only the error type is logged, never the member's email. | Check the database, then retry. |
| ERROR | Error finding organization membership: <ExceptionType> | PATCH /organization/member_update could not read the membership and the caller got a 400. Only the error type is logged. | Check the database, then retry. |
SCIM lines
These come from SCIM provisioning, when an identity provider creates, updates or deactivates users and groups.
| Level | Line | Meaning | Action |
|---|
| INFO | SCIM: blocked <n> virtual key(s) for user_id=<id> (or unblocked) | A user was deactivated, deleted or reactivated in the directory and their keys followed. | None. |
| INFO | SCIM: email <email> already provisioned as user_id=<id>, keeping that id ... | A create request was linked to an existing account with the same email. | None, unless a new account was expected. |
| INFO | SCIM: merged placeholder user '<id>' into '<id>', moving teams ... | A placeholder repair finished. | None. |
| WARNING | Error reading scim_admin_group setting, defaulting to None | The config could not be read, so no push grants proxy admin until it can. | Check the config file and the database. Controlled by spanway_settings.scim_admin_group. |
| WARNING | Error reading scim_upsert_user setting, defaulting to True | The config could not be read, so unknown group members are created. | Check the config file. Controlled by spanway_settings.scim_upsert_user. |
Key hygiene and master key lines
| Level | Line | Meaning | Action |
|---|
| INFO | key hygiene: set an expiry on N unused keys | The hourly key hygiene run gave N unused keys an expiry date. | None. |
| INFO | key hygiene: capped the lifetime of N keys | The hourly run shortened N expiry dates to the lifetime cap. | None. |
| INFO | key hygiene: sent expiry notices for N keys | The hourly run emailed N key owners. | None. |
| INFO | key hygiene: expiry notices skipped, no email callback is configured | Expiry emails are on but no email provider is set up. | Configure email or set expiry_notice_days: []. |
| ERROR | key hygiene job skipped: general_settings.key_hygiene is invalid: ... | The policy does not validate, so the hourly job does nothing. | Fix the value named in the message. |
| DEBUG | Key hygiene auto-expiry is an Enterprise Feature. Skipping... | No enterprise license, so the job is not scheduled. | Add a license with key_hygiene. |
| WARNING | Re-encrypting N stored value(s) from the SPANWAY_MIGRATE_FROM_MASTER_KEY key ... and Done re-encrypting N stored value(s) ... | The startup master key migration ran and finished. | Remove SPANWAY_MIGRATE_FROM_MASTER_KEY and restart. |
| WARNING | Could not migrate stored values from the SPANWAY_MIGRATE_FROM_MASTER_KEY key (...) | The startup migration failed. Values still on the old key cannot be read. | Fix the database connection and restart with the variable still set. |
Access group lines
| Level | Line | Meaning | Action |
|---|
| ERROR | delete_access_group failed: access_group_id=<id> error=<error> | Deleting an access group failed and nothing was removed. | Check the database, then retry. |
| DEBUG | Could not fetch access group <id> for resource field <field> | An access check could not load a group, so it granted nothing for that request. | None after a delete. Otherwise check the database. |
Custom role lines
| Level | Line | Meaning | Action |
|---|
| DEBUG | custom role <name> decided <allow, deny or inherit> for route <route> | How a user's custom role decided one request. Shown with --detailed_debug. | None. Use it to see why a route was allowed or refused. |
| DEBUG | custom role <name> ignored: enterprise package unavailable | The image has no enterprise package, so the user's Global Proxy Role decides. | Use the enterprise image if custom roles should apply. |
Project lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Exception: <message> with a stack trace | A project route refused the call, for example a model the team cannot use or a missing permission. Every refused project call is logged this way, so a 400 or 403 also shows as ERROR. | None when the caller got the 4xx you expect. Look into it when the status is 500. |
Team lines
| Level | Line | Meaning | Action |
|---|
| INFO | Successfully updated team - <team_id>, info | A team update was saved. | None. |
| WARNING | team_admin_editable_team_fields must be a list of field names; ignoring <value> | The setting is not a list, so team admins can edit nothing. | Fix team_admin_editable_team_fields in the config or on Settings, UI Settings. |
| WARNING | team_admin_editable_team_fields ignores unsupported field(s) <names>; supported: <names> | Some listed fields are not supported and were dropped. | Remove the unsupported names. |
| INFO | Some users are already in team. Existing members=<...>. Duplicate members=<...> | A member add named people who were already on the team. They were skipped. | None. |
| ERROR | /team/member_add: adding user_id=<id> to team failed | Adding one member failed, and the caller got a 500. | Check the database, then retry. |
| ERROR | /team/filter/ui: team search failed | The team search in the Admin UI failed, and the caller got a 500. | Check the database. |
| WARNING | Failed to write team-callback audit log: <error> | A team logging callback change was saved but its audit row was not. | Check the database. |
Internal user lines
| Level | Line | Meaning | Action |
|---|
| ERROR | /user/new could not create the user: <ExceptionType> | Creating a user failed for a reason the gateway did not expect, and the caller got a 500. Refusals such as a duplicate email answer 4xx and log nothing here. The line names only the error type, so no email address reaches the log. | Check the database connection, then retry. |
| WARNING | Failed to create audit log for user <id>: <error> | A user change was saved, but its audit row was not. | Check the database. |
| WARNING | Unable to create audit log for user on /user/new - <error> | A new user was created, but its audit row was not. | Check the database. |
| INFO | Password changed via /user/password/change for user_id=<id> | A user changed their own password. Their other dashboard sessions were signed out. | None. |
| ERROR | users/bulk_delete: failed to delete users <ids>: <error> | A bulk user delete failed for those users. | Retry, then check the database. |
Virtual key lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Custom API key rejected: disable_custom_api_keys is enabled | Someone sent their own key value while the gateway only allows generated keys. | None, the caller got a 403. |
| ERROR | spanway.proxy.proxy_server.generate_key_fn(): Exception occured - <error> | Creating a key failed or was refused. | None for a 4xx the caller expected. Check the database for a 500. |
| WARNING | Failed to send key created email | The key was created but the email to its owner was not sent. | Check the email settings. |
| WARNING | Failed to rotate virtual key in secret manager or Failed to rename virtual key in secret manager | The key changed in the gateway but the copy in your secret manager did not. | Check the secret manager credentials, then rotate or rename the key again. |
Auto router lines
| Level | Line | Meaning | Action |
|---|
| WARNING | [LAR-1] Invalid lar1 metadata: <error>. Using defaults or [LAR-1] Invalid lar1 metadata type: <type>. Using defaults | An agent sent a metadata.lar1 block that does not validate, so the request was routed with the default confidence. Missing metadata logs nothing. | Fix the agent's metadata, see LAR-1 routing. |
| INFO | [LAR-1] confidence=<n> -> <type> | The deployment type LAR-1 chose. | None, normal. |
| WARNING | [LAR-1] No deployment for type '<type>', fallback to deployment type '<other>' | No healthy deployment carries the target model_info.type, so another type served the request. | Add a deployment of that type or check why it is cooling down. |
| INFO | QualityRouter: keyword override matched='<keyword>' routed_model=<model> (quality_tier=<n>, input_cost_per_token=<price>) | A quality router keyword picked the model without classification. | None, normal. |
| ERROR | adaptive_router flusher iteration failed | The background task that saves adaptive router learning to the database failed once. It retries every ten seconds. | Check the database connection if it repeats. |
| ERROR | shadow_eval: funnel seed failed for job <id>: <error> | A shadow eval started but its coverage counters could not be created, so coverage shows as unknown for that job. | None for the job, check the database if it repeats. |
| WARNING | shadow_eval: spend counter increment failed for <counter key>: <error> | Redis did not take a shadow eval's spend, so the job's budget check cannot see the newest samples and the target budget can be overshot by the samples in flight. | Check Redis. The overshoot stops once Redis answers again. |
Fine-tuning and file lines
| Level | Line | Meaning | Action |
|---|
| ERROR | spanway.proxy.proxy_server.create_fine_tuning_job(): Exception occurred - <error> | A fine-tuning call failed. The same line exists for retrieve, list and cancel, and spanway.proxy.fine_tuning_endpoints.<operation>(): Exception occurred - <error> for events, checkpoints, pause and resume. | None for a 4xx the caller expected. Check finetune_settings and the provider for anything else. |
| ERROR | spanway.proxy.proxy_server.create_file(): Exception occured - <error> | An upload through /v1/files failed, see managed files. | None for a 4xx, check the provider or the database for a 5xx. |
| WARNING | Ignoring invalid max_file_downloads_per_minute in <key or team> metadata; expected a positive integer | A key or team carries a bad download limit, so the gateway value applies. | Fix the metadata value. |
Batch lines
| Level | Line | Meaning | Action |
|---|
| WARNING | batch <id> no longer exists at the provider, retiring it | The batch cost job found a batch the provider deleted and stops polling it. | None. |
| WARNING | CheckBatchCost could not retrieve batch <id>: <error> | The cost job could not read a batch from the provider and tries again on its next run. | Check the provider credentials when it repeats. |
| WARNING | CheckBatchCost could not settle batch <id>: <error> | A batch cost could not be written to the database. | Check the database. |
| WARNING | managed batch <id> carries no model_id, retiring it | A stored batch has no model, so it cannot be costed. | None. |
| INFO | CheckBatchCost marked <n> batches older than <date> stale | Batches past MANAGED_OBJECT_STALENESS_CUTOFF_DAYS stop being polled. | None. |
| WARNING | Spanway-executed batch <id> heartbeat failed: <error> | A batch that runs inside the gateway could not record its heartbeat. After 180 seconds without one it fails as stopped. | Check the database. |
Vector store and RAG lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Error creating vector store: <error> | A vector store management route failed and answered 500. The same line exists for updating, deleting, listing and getting vector store info. | Read the error, often a database problem. |
| WARNING | Failed to resolve vector store id=<id> from registry: <error> | A search could not read the store from memory and fell back to the database. | Check the registration when it repeats. |
| WARNING | Failed to resolve vector store id=<id> from shared cache: <error> | The store's row could not be read, so the call answered 500 Unable to validate vector store access. | Check the database and Redis. |
| ERROR | RAG Ingest failed: <error> | A RAG ingest stopped on an error. | Read the error. |
| ERROR | Failed to save vector store <id> to database: <error> | Ingest succeeded at the provider but the gateway registration was not written. | Register the store by hand and check the database. |
| ERROR | RAG Query failed: <error> | A RAG query stopped on an error. | Read the error when the caller got a 500. |
Search tool lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Search tool <id> was not re-encrypted: its stored spanway_params did not match on write | A stored search tool kept its old encryption during a master key rotation. | Run the rotation again. |
| WARNING | Search tool <name> has spanway_params that do not decrypt with the current key; keeping the loaded version. Restart the proxy if the master key was rotated. | The stored provider key cannot be read with the current master key. | Restart after a master key change, or enter the provider key again. |
| ERROR | Search tool router refresh failed after a management write: <error> | A tool was saved but this gateway did not pick it up yet. The next reload does. | None unless it repeats. |
| ERROR | Error adding search tool to db: <error>, Error updating search tool: <error>, Error deleting search tool: <error> or Error listing search tools: <error> | A search tool route failed and the caller got a fixed 500 text. The cause is only here. | Fix what the error names, usually the database. |
Identity and sign-in lines
| Level | Line | Meaning | Action |
|---|
| WARNING | JWT auth is enabled but neither JWT_AUDIENCE nor JWT_ISSUER is configured. ... | Logged once, on the first JWT request. Any token signed by the provider is accepted, see JWT auth. | Set JWT_AUDIENCE. |
| INFO | JWT Key Mapping (auto_register): ... | Auto registration created a key and mapping. | Normal when it is on. |
| DEBUG | Oauth2 token validation answered active=<flag> | An introspection answer arrived. Only the active flag is logged, never the token or the answer, see OAuth2 auth. | None. |
| WARNING | workload identity token exchange refused: <code> (<description>) issuer='<issuer>' | A token exchange was refused. The issuer is quoted and cut to 200 characters, see workload identity. | Many in a row mean a policy or audience mismatch. |
| WARNING | workload identity key for trust policy <name> failed: <reason> | A trusted token could not be turned into a key. | Create the team or fix the database. |
| INFO | workload identity: deleted <n> expired keys | The hourly cleanup ran. | None. |
| ERROR | SAML settings could not be loaded: <reason> | SAML sign-in cannot start, see Admin UI SSO. | Fix the metadata. |
| WARNING | SAML response could not be processed: <reason> or SAML authentication failed: <reason> | A SAML sign-in was refused. The caller saw a fixed 401 text, the reason is only here. | Many in a row mean a certificate, clock or attribute mismatch. |
| ERROR | SAML service provider metadata is invalid: <reason> | /sso/saml/metadata answered 500. | Fix SAML_SP_ENTITY_ID or PROXY_BASE_URL. |
| WARNING | CLI SSO login session not found in cache for login_id=<id>. ... | A CLI sign-in reached a replica that cannot see it, see CLI sign-in. | Share Redis between replicas. |
| WARNING | org sso: refused sign-in through <connection>: <reason> | An organization SSO sign-in was turned away, see organization SSO. | Fix the account the reason names. |
| WARNING | org sso: SAML response could not be processed: <reason> or org sso: SAML authentication failed: <reason> | An organization SAML sign-in was refused with a fixed 401 text. | Check the provider's certificate and clock. |
| WARNING | use_x_forwarded_for is true but trusted_proxy_ranges is not set, ... | IP allow lists check the load balancer address, see allow lists. | Set trusted_proxy_ranges. |
| ERROR | Stored <scope> allowed_ips is invalid, denying the request: <reason> | A stored IP list cannot be read and its requests are refused. | Save a valid list. |
| ERROR | Route <route> not in allowed_routes=<list> | general_settings.allowed_routes refused a request. | Add the route if it should work. |
| WARNING | Admin UI sign-in blocked for <n> seconds after too many failures; scope=<user or source> username=... source=... | A sign-in lockout started, see sign-in security settings. An audit row is written too. | None for an attacker. Check the source when it is your own network. |
| WARNING | Admin UI sign-in refused: the <scope> is blocked for <n> more seconds; username=... source=... | A sign-in during a block was refused with 429. | Wait, or add an override for the address. |
| WARNING | Redis failed while counting Admin UI sign-in attempts; using this worker's own counters until it recovers: ... | The coordination Redis is unreachable. | Check Redis. |
| WARNING | trusted_proxy_ranges is not set or not a valid list of ranges, so failed Admin UI sign-in attempts are limited per source address and username only. ... | The per address sign-in limit is off. | Set trusted_proxy_ranges. |
| WARNING | Breached-password check skipped, HIBP lookup failed: ... | A new password was accepted without the breach check. | Allow the lookup or turn the check off. |
| WARNING | Claude Code gateway login session is malformed: ... | A Claude Code gateway sign-in failed with invalid_grant, see Claude Code gateway. | None for one occurrence. |
| INFO | Spanway: SPANWAY_AIRGAPPED is set, optional outbound fetches use their bundled fallbacks | Air-gapped mode is on. Shown only at INFO or lower. | None. |
| ERROR | egress_allowlist in the database is not a list of hosts and was not applied | The egress allowlist saved in the database cannot be read, see air-gapped deployment. | Save the list again. |
| WARNING | plugins: skipped a plugin entry with invalid fields <fields> | An Admin UI plugin entry is invalid and was left out, see UI plugins. | Fix the named fields. |
| WARNING | Plugin <name> has invalid manifest JSON, skipping, Plugin <name> has no source field, skipping | A Claude Code marketplace plugin was left out of the catalogue, see plugin marketplace. | Replace or delete the plugin. |
| ERROR | Error generating marketplace: ... | marketplace.json failed with 500. | Check the database. |
Agent tracing lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Agent tracing unavailable: configure SPANWAY_LENS_URL and SPANWAY_LENS_SERVICE_TOKEN | Tracing is on but the gateway cannot connect to Lens, so the trace routes answer 501. | Set both variables, see agent traces. |
| INFO | Agent tracing enabled (store=lens) | The gateway connected to Lens at startup. | None. |
| WARNING | Trace read unavailable: <reason> | Lens did not answer a trace or span read, and the caller got a 503. | Check Lens. One line during a Lens restart is normal. |
| WARNING | Trace SQL query unavailable: <reason> or Trace query help unavailable: <reason> | A trace query or its help failed or ran past the reader limits. | Narrow the query, or check Lens when every query fails. |
| WARNING | Trace explorer query returned rows of an unexpected shape: <details> | Lens answered a trace search or session read with rows the gateway does not understand, and the caller got a 503. It usually means the gateway and Lens run different releases. | Run the same release of the gateway and Lens, see trace search. |
| ERROR | Daily activity export failed: <reason> | An agent or other activity export or aggregated query failed, and the caller got Failed to fetch analytics. | Check the database. |
| ERROR | User agent analytics query failed: <reason> | A user agent analytics route failed, and the caller got a 500. | Read the database error. |
| ERROR | MCP usage analytics query failed: <reason> | A /tag/mcp route of MCP usage analytics failed in the database, and the caller got a 500. | Read the database error. A missing table means the migrations have not run. |
Agent lines
| Level | Line | Meaning | Action |
|---|
| INFO | Proxying A2A request to agent '<agent>' at <url> | The gateway is calling an A2A agent at this address. | None. |
| DEBUG | A2A request for agent '<agent>': method=<method> id=<id> | An A2A message call arrived. The message text is never logged. | None. |
| ERROR | Error invoking agent: <reason> or Error streaming A2A response: <reason> | A call to an agent failed, and the caller got the JSON-RPC -32603 error. | Check the agent's address, credentials and own logs, see A2A agents. |
| ERROR | Unexpected error during A2A discovery: <reason> | Agent card discovery failed and answered Discovery failed. | Read the reason. |
| WARNING | Failed to register agent '<name>' (ID: <id>) in memory: <reason> | The agent was saved but this replica did not load it yet. | Wait for the periodic reload or restart the replica. |
| ERROR | Error adding agent to db, Error getting agent from db, Error updating agent, Error deleting agent or Error making agent public, each with a reason | An agent management call failed, and the caller got <action> failed. The gateway log has the cause. | Read the database error. |
| ERROR | Agent '<name>' in config.yaml sets <controls>. ... Those controls are not enforced. | A config.yaml agent turns on governance controls the license lacks. | Add agent_governance, or remove the controls, see agent governance. |
| WARNING | MaxIterationsHandler: rejecting request, Redis could not verify the session count or MaxBudgetPerSessionHandler: rejecting request, Redis GET could not verify the session spend | Redis did not answer and a session limited call was refused with 503. | Restore Redis. |
| WARNING | MaxIterationsHandler: Redis failed, falling back to in-memory: <reason> | A session was counted on this instance only. | Restore Redis. |
| WARNING | Agent health check gather timed out after <n> seconds | The Agents page health check ran out of time. | Raise SPANWAY_AGENT_HEALTH_CHECK_GATHER_TIMEOUT or check slow agents. |
| INFO | stored credential <name> for agent <agent_id>, rotated credential <name> of agent <agent_id> to version <n> or deleted credential <name> of agent <agent_id> | An admin changed an agent's stored credential. The secret is never logged. | None. |
| WARNING | revoked credential <name> of agent <agent_id>, suspended every stored credential of agent <agent_id> or resumed every stored credential of agent <agent_id> | An admin revoked a credential or used Suspend all credentials. | None, unless nobody expected it. |
| WARNING | refused agent <agent_id> a call to MCP server <server_id>: <code> or refused agent <agent_id> the credential <name>: <code> | An agent's tool call or token exchange was refused because its credential is revoked, expired, suspended or unreadable. | Rotate the credential or resume the agent's credentials if the call should work. |
| ERROR | agent credential lookup failed for agent <agent_id>: <error type> or agent credential exchange failed for agent <agent_id>: <error type> | The agent's stored credentials could not be read, so the call was refused. | Check the database. |
| WARNING | using the last known credential list of agent <agent_id>, refresh failed: <error type> | The database could not be read, so the gateway kept using the list of MCP servers the agent holds credentials for that it read earlier. Calls to servers without a credential continue, calls that need one are refused. | Check the database if it repeats. |
| WARNING | Failed to re-seal agent credentials: <error type> | A master key rotation could not re-encrypt agents' stored credentials. | Rotate the affected credentials again with their secrets. |
| WARNING | Could not register the agent credential metric: <error> | The spanway_agent_credential_uses_total Prometheus counter is missing on this replica. Credentials still work. | Install the gateway with its Prometheus extra, or ignore it if you do not scrape metrics. |
Skill lines
| Level | Line | Meaning | Action |
|---|
| WARNING | SkillsInjectionHook: Skill '<id>' not found in Spanway DB | A request named a gateway skill that is missing or belongs to someone else. | Check the id and owner, see skills. |
| WARNING | SkillsInjectionHook: Max iterations (<n>) reached | The model kept asking to run skill code past the round limit. | Tighten the skill's instructions. |
| ERROR | SkillsInjectionHook: Code execution failed: <reason> | Running skill code failed, for example Docker is not reachable. | Check Docker access from the gateway host. |
| ERROR | SkillsSandboxExecutor: the sandbox library is missing from this gateway build | The build has no code sandbox. | Use the published gateway image. |
| WARNING | Agent Skills index: skipping skill <id>, its upload is not a zip holding SKILL.md at the root of a single top-level folder | The skill is left out of the public index. | Re-upload it as such a zip. |
| ERROR | Error registering plugin, Error updating plugin, Error enabling plugin, Error disabling plugin, Error deleting plugin, Error listing plugins, Error getting plugin or Error generating marketplace, each with a reason | A Skills page plugin route failed, and the caller got a fixed message. | Read the database error. |
Decisions lines
| Level | Line | Meaning | Action |
|---|
| ERROR | spanway.proxy.proxy_server._handle_llm_api_exception(): Exception occured - spanway_call_id=<id> - <message> | A Decisions call, like any inference call, was refused or failed. | For a 400 the caller has to fix the request. Repeated 401 or 5xx lines point at a provider key or outage, see Decisions API. |
Retention cleanup lines
| Level | Line | Meaning | Action |
|---|
| INFO | Spend log cleanup run finished: outcome=completed ... | A retention cleanup run cleaned every table it had to. | None. |
| WARNING | Spend log cleanup run finished: outcome=budget_exhausted ... (or batch_cap_reached, aborted) | The run stopped early, the next run continues. | Only when it repeats every run: raise maximum_spend_logs_cleanup_run_budget or run the cleanup more often. |
| INFO | Another pod is already running cleanup | Another replica holds the cleanup lock. | None. |
| ERROR | Error during spend log cleanup: <ErrorClass>: <message> | The run failed, usually on a database timeout. | Check the database, the next run retries. |
| ERROR | Invalid maximum_spend_logs_retention_interval value: ... or Invalid maximum_spend_logs_cleanup_cron value: ... | The schedule cannot be read, so the cleanup job is not scheduled. | Fix the setting. |
| WARNING | <setting> is an integer (<n>); treating as days. ... | A period in config.yaml is a bare number, read as days. | Write it as <n>d. |
| WARNING | Could not record the spend log cleanup last run time: ... | The run happened but its time was not stored. | Check the database. |
| WARNING | Could not expire log-derived eval dataset items: ... | Dataset items copied from logs were skipped this run. | Read the message. |
See retention.
Billing lines
| Level | Line | Meaning | Action |
|---|
| WARNING | billing: stripe invoice <id> is not ours | Stripe sent an event for an invoice the gateway did not create. It was ignored. | None when the Stripe account is shared. |
| WARNING | billing: the license does not include billing, skipping monthly invoices | The monthly invoice job is on but the license lacks billing. | Renew the license or turn billing_auto_generate_invoices off. |
| INFO | billing: another pod is generating this month's invoices, skipping | Another replica runs the monthly job. | None. |
| INFO | billing: generated <n> draft invoices, skipped <n> accounts | The monthly job finished. | Review and issue the drafts. |
| WARNING | Enterprise billing metrics disabled: licensed deployment missing config (...) | A licensed gateway has no usage metering endpoint or certificates set, so nothing is reported. | Set the SPANWAY_BILLING_METRICS_* variables if your license needs metering, see usage metering. |
Status page lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Error reading incidents for the status page: <error> | Incidents could not be read, so the report is served without them. | Check the database. |
Admission control and control plane lines
| Level | Line | Meaning | Action |
|---|
| ERROR | Ignoring invalid admission control settings, per-worker admission control is disabled: <error> | The admission settings cannot be read, so no request is limited. | Fix max_in_flight_requests_per_worker, max_queued_requests_per_worker or admission_queue_timeout_seconds. |
| WARNING | control_plane_url is configured but Redis is not configured for Spanway caching. Login codes (SSO and /v3/login) will not be shared across instances ... | Sign-in from the control plane can fail with 401 when the code exchange reaches another instance or worker. | Configure Redis in the cache section on every worker. |
Admin UI sign-in lines
| Level | Line | Meaning | Action |
|---|
| WARNING | Admin UI sign-in refused: the <scope> is blocked for <n> more seconds; username=... source=... | A sign-in arrived while its username or source address is blocked. | None, unless it is a real user, who waits or uses the master key. |
| WARNING | Admin UI sign-in blocked for <n> seconds after too many failures; scope=... username=... source=... | Too many failed sign-ins started a block. | Look for guessing from that source. |
| WARNING | Running <n> workers but Redis is not configured. Failed Admin UI sign-in attempts are counted per worker ... | The sign-in limits apply per worker. | Configure Redis. |
| WARNING | trusted_proxy_ranges is not set or not a valid list of ranges, so failed Admin UI sign-in attempts are limited per source address and username only. ... | The per-address limit is off. | Set trusted_proxy_ranges. |
| WARNING | Invalid <setting> value ...; using <default> or Invalid address or range ... in <setting>; skipping | A sign-in limit setting cannot be read and its default applies. | Fix the setting. |
| WARNING | Redis failed while counting Admin UI sign-in attempts; using this worker's own counters until it recovers: ... | Redis did not answer. | Check Redis. |
| WARNING | Login-time breach screening could not update user <id>: ... | A breached password was found but the user row was not marked. | Check the database. |
| INFO | Ignoring stale spanway_cp_return_to cookie; landing on dashboard | An old control plane return cookie was ignored. | None. |
| ERROR | Failed to roll back onboarding invitation after session key mint failed. | A claim failed and its invitation could not be reset. | Send the user a new invitation link. |
Code graph lines
| Level | Line | Meaning | Action |
|---|
| INFO | Code graph schema versions applied: <versions> | The codegraph schema was created or upgraded at startup. | None. |
| INFO | Code graph removed index rows of <n> deleted repositories | The startup sweep removed rows of repositories deleted while the code graph was off. | None. |
| WARNING | Code graph startup sweep failed: <error type> | That cleanup could not run. | Check the database, it runs again next start. |
| ERROR | Code graph stays off because its database role is unsafe: <problems> | The application role owns the schema or bypasses row-level security. | Use a role that is only a member of codegraph_reader and codegraph_writer. |
| ERROR | Code graph indexing stays off because the sandboxed parser could not parse a sample... | The parser lacks its grammars, so nothing is indexed. | Fix SPANWAY_CODE_GRAPH_PARSER_PYTHON. |
| ERROR | Code graph failed to start and stays off: <error type> | Startup failed. Only the error type is logged. | A ValueError usually means a SPANWAY_CODE_GRAPH_* variable has a wrong value, a connection error means the database. Fix it and restart. |
| WARNING | Code graph indexing failed for run <run id>: <error type> | One index run failed. | Read the run's error on the Code Graph page and reindex. |
| WARNING | Code graph poll failed for <repo id>: <error type>, Code graph poller tick failed, Code graph worker poll failed, Code graph maintenance tick failed or Code graph lease renewal failed for run <run id> | A background step failed once and is retried. | Check the database or the credential when it repeats. |
| WARNING | Code graph metrics could not be registered: <error> | The code graph metrics are missing from /metrics. | Check that only one process registers them. |
Each line is explained on the code graph page.
Workflow lines
| Level | Line | Meaning | Action |
|---|
| INFO | workflow runner is not running steps in this process: <reason> | This process only accepts runs, or the runner is off. | None when intended. |
| WARNING | workflow runner could not renew its step leases: <error>, workflow runner heartbeat failed: <error> | The process lost contact with the database, and its steps may move to another replica. | Check the database. |
| WARNING | workflow step <step id> attempt <n> failed: <error> | One step attempt failed and may be retried. | Read the step's error on the Runs tab. |
| WARNING | workflow run <run id> failure alert was not sent: <error> | The failure alert was not delivered. | Check the alerting integration. |
| WARNING | workflow run <run id> on_failure plan is invalid: <message> | The compensating workflow could not start. | Fix the on_failure steps. |
| ERROR | general_settings.workflow_triggers is invalid, triggers are off: <error> | No trigger fires until the settings validate. | Fix the setting and restart. |
| WARNING | workflow trigger <trigger id> disabled: <reason> | A trigger turned itself off. | Fix the cause and turn it on again. |
| INFO | workflow trigger <trigger id> refused a <provider> event: <reason> | A Slack, Teams, mail or calendar event came from outside the trigger's access mapping. No message text or person is named. | Add the person or place to the mapping if they should be allowed, see connected service triggers. |
| ERROR | workflow trigger event buffer is full; dropping <id> | Gateway events arrived faster than they could be saved. | Check the database and the replica's load. |
| ERROR | Error creating workflow run: <error> and the other Error ... workflow ... lines | A stored-run request failed in the database, and the caller got a 500. | Read the error. |
The full lists are on the workflow runner, triggers and stored runs pages.
Review queue lines
| Level | Line | Meaning | Action |
|---|
| INFO | Deleted <n> expired eval review items | The daily cleanup removed review items past their retention, with their labels. | None. |
The review routes themselves write no log lines, see review queues.
Prometheus lines
| Level | Line | Meaning | Action |
|---|
| DEBUG | Starting Prometheus Metrics on /metrics (a virtual key or the master key is needed) | /metrics is mounted and needs a key. With require_auth_for_metrics_endpoint: false it says no key is needed. | None. |
| WARNING | prometheus_metrics_ttl_seconds is ignored while PROMETHEUS_MULTIPROC_DIR is set: ... | With several workers series cannot be forgotten, so only the series cap applies. | Set prometheus_metrics_max_series_per_metric. |
| ERROR | one line per unknown name from prometheus_metrics_config | Only when the rich package is missing, otherwise a table is printed. Startup then stops. | Fix the name. |
| WARNING | Error recording ... metric: ... | One metric update was skipped. | None if rare. |
See Prometheus metrics.
What is never logged
Every line passes through the same redaction before it is written, at any level and in both formats. A value that matches one of these shapes is replaced with REDACTED.
| Kind | Examples of what is replaced |
|---|
| Keys and tokens | Virtual keys and provider keys that start with sk-, Bearer and Basic header values, raw JWTs, Google AIza keys, Google ya29. access tokens, AWS access key ids, Databricks tokens |
| Named secrets | The value after api_key, x-api-key, master_key, database_url, password, client_secret, private_key, signing_key, encryption_key, access_token, refresh_token, webhook_url and similar names, in key=value, JSON and dict form |
| Connection strings | The user and password in scheme://user:pass@host URLs |
| URL credentials | api_key, key, token, password and Azure sig query parameters |
| Key material | PEM private key blocks and whole service account JSON documents |
The gateway does not write prompts or responses in its own lines at INFO and above, and redact_messages_in_exceptions keeps prompt text out of exception messages, alerts and the log. Request and response bodies appear only at DEBUG (--detailed_debug, SPANWAY_LOG=DEBUG or SPANWAY_PRINT_STANDARD_LOGGING_PAYLOAD), which the startup warning above calls out. What request logs keep is controlled separately by store_prompts_in_spend_logs, see What Spanway stores.
Turn on debug logging for one investigation
- Reproduce the problem on a staging gateway, never on production traffic.
- Restart that gateway with
SPANWAY_LOG=DEBUG, or with --detailed_debug to also print request and response bodies.
- Send the failing request and copy the lines that carry its
x-spanway-call-id.
- Restart without the setting. The startup warning about debug output disappears when it is off.