Metrics reference
The Stacklok Enterprise platform components export metrics through
OpenTelemetry. This page lists the metrics that the AI Gateway and its adapters,
the Connector Gateway, and the Enterprise Manager emit, plus the build
information metric they share. Platform metric names start with
stacklok.<COMPONENT>., for example stacklok.ai_gateway. or
stacklok.enterprise_manager.. A few metrics use standard OpenTelemetry
semantic convention names, such as http.server.request.duration, or keep an
older name.
Each area starts with a table of metric names, types, and units. A section for each metric follows, with its description, type, unit, and labels.
For metrics from ToolHive components, such as the MCP server proxy, Virtual MCP Server (vMCP), and the Registry Server, see ToolHive observability.
Collect the metrics
Each component exposes its metrics differently:
- AI Gateway: serves Prometheus metrics on a dedicated port,
9464by default (set withtelemetry.metrics.port), pushes them over OpenTelemetry Protocol (OTLP), or both. Both are off by default. See Collect gateway telemetry. The scanning and guardrails adapters serve their own metrics; see Scanning adapter. - Connector Gateway: see Collect Connector Gateway telemetry.
- Enterprise Manager: serves every metric in Prometheus format at
/metricson port8080, and can also push them over OTLP when you settelemetry.otlp.enabled. The Enterprise Manager's gRPC NetworkPolicy (grpc.networkPolicy.enabled, required withdirectory.kek.enabled) doesn't admit port8080. While it applies, add your own NetworkPolicy that lets Prometheus reach port8080.
How names appear in Prometheus
The tables list each metric's OpenTelemetry name. The Prometheus exporter renders that name for scraping with these rules:
- Dots become underscores.
- Counters gain
_total. A name that already ends in_totalkeeps it once. - Unit
sadds_seconds, and unitmsadds_milliseconds. - Gauges with unit
1add_ratio. - Units in braces, such as
{request}, describe what is counted and add no suffix. - Histograms appear as
_bucket,_sum, and_countseries.
For example, stacklok.ai_gateway.token.usage appears as
stacklok_ai_gateway_token_usage_total, and stacklok.build_info appears as
stacklok_build_info_ratio. Label names follow the same rule, so the label
http.route appears as http_route.
Some series appear only after their first sample, and some come only from the
Enterprise Manager replica that holds leadership. Aggregate these across pods
with sum or max, and don't read a missing series as zero. Gauges that a
periodic job updates keep reporting their last value, so a stalled job looks the
same as a healthy one.
AI Gateway
Every gateway metric carries the label implementation="v2", which separates it
from the legacy AI Gateway when both report to the same metric store. Metrics
from the scanning and guardrails adapters don't carry this label.
Requests and latency
| Metric | Type | Unit |
|---|---|---|
http.server.request.duration | Histogram | s |
stacklok.ai_gateway.interaction.requests | Counter | {request} |
stacklok.ai_gateway.request.overhead | Histogram | s |
stacklok.ai_gateway.client.write | Histogram | s |
stacklok.ai_gateway.provider.duration | Histogram | s |
stacklok.ai_gateway.provider.time_to_first_byte | Histogram | s |
gen_ai.server.request.duration | Histogram | s |
gen_ai.server.time_to_first_token | Histogram | s |
stacklok.ai_gateway.token.usage | Counter | {token} |
http.server.request.duration
Duration of every HTTP request on the gateway's ingress listener, including requests refused by authentication. Use it for request rate, latency, and error rate.
- Type: Histogram (
s) - Labels:
http.request.method,http.route(the route template, orunknown_route),http.response.status_code,url.scheme
stacklok.ai_gateway.interaction.requests
Counts each model interaction that reached governance, once, including requests refused before they reach a provider.
- Type: Counter (
{request}) - Labels:
outcomeoutcome:success,rejected,error,client_disconnect
stacklok.ai_gateway.request.overhead
Time the gateway itself adds to an interaction sent to a provider. A request refused before dispatch records nothing.
- Type: Histogram (
s) - Labels: None
stacklok.ai_gateway.client.write
Time spent writing the response back to the client, for each interaction sent to a provider.
- Type: Histogram (
s) - Labels: None
stacklok.ai_gateway.provider.duration
Time the provider took to answer, for interactions where it can be measured.
- Type: Histogram (
s) - Labels:
provider,model,outcomeoutcome:success,error
stacklok.ai_gateway.provider.time_to_first_byte
Time until the provider's first response frame arrived.
- Type: Histogram (
s) - Labels:
provider,model
gen_ai.server.request.duration
End-to-end duration of each interaction sent to a provider, using the
OpenTelemetry generative AI semantic conventions. Appears as
gen_ai_server_request_duration_seconds.
- Type: Histogram (
s) - Labels:
gen_ai.system(the provider),gen_ai.request.model
gen_ai.server.time_to_first_token
Time until the first response frame, using the generative AI semantic
conventions. Appears as gen_ai_server_time_to_first_token_seconds.
- Type: Histogram (
s) - Labels:
gen_ai.system,gen_ai.request.model
stacklok.ai_gateway.token.usage
Tokens per finalized interaction when the provider reports usage. See Record token usage for header and claim labels.
- Type: Counter (
{token}) - Labels:
model,provider,token_type,cache_type, plus any labels you map from headers or claimstoken_type:input,outputcache_type:uncached,cache_read,cache_creation; input tokens only
Governance hooks and policy webhooks
| Metric | Type | Unit |
|---|---|---|
stacklok.ai_gateway.hook.invocations | Counter | {invocation} |
stacklok.ai_gateway.hook.duration | Histogram | s |
stacklok.ai_gateway.governance.denials | Counter | {denial} |
stacklok.ai_gateway.webhook.invocations | Counter | {invocation} |
stacklok.ai_gateway.webhook.duration | Histogram | ms |
stacklok.ai_gateway.webhook.retries | Counter | {retry} |
stacklok.ai_gateway.webhook.invocations_dropped | Counter | {invocation} |
stacklok.ai_gateway.webhook.probes | Counter | {probe} |
stacklok.ai_gateway.webhook.envelope_oversize | Counter | {envelope} |
stacklok.ai_gateway.webhook.observation_queue.depth | Gauge | {fire} |
stacklok.ai_gateway.hook.invocations
Counts each governance hook call that runs. After a required hook denies a request, later hooks record nothing.
- Type: Counter (
{invocation}) - Labels:
hook_name,hook_enforcement,outcomehook_enforcement:required,observationoutcome:success,rejected,error,timeout
stacklok.ai_gateway.hook.duration
Duration of each governance hook call.
- Type: Histogram (
s) - Labels: Same as
hook.invocations
stacklok.ai_gateway.governance.denials
Counts requests a required hook denied or failed closed on, and requests an observation hook would have denied.
- Type: Counter (
{denial}) - Labels:
hook_name,hook_enforcement,kindhook_enforcement:required,observationkind:denied,failed_closed,would_deny
stacklok.ai_gateway.webhook.invocations
Counts each completed call to a webhook receiver, including transport errors. The built-in budgets and scanning hooks are receivers too, so this appears whenever either is on, as well as for policy webhooks you add.
- Type: Counter (
{invocation}) - Labels:
webhook_name,webhook_phase,webhook_type,webhook_outcome,webhook_reasonwebhook_phase:Request,Responsewebhook_type:Validating,Observationwebhook_outcome:admit,deny,disabled,failurewebhook_reason:none,explicit_deny,timeout,connection_failure,malformed_response,receiver_error,disabled,internal_error,canceled
stacklok.ai_gateway.webhook.duration
Duration of each completed webhook call. Appears as
stacklok_ai_gateway_webhook_duration_milliseconds.
- Type: Histogram (
ms) - Labels:
webhook_name,webhook_phase,webhook_outcome
stacklok.ai_gateway.webhook.retries
Counts retries of a required webhook call. Observation calls are never retried.
- Type: Counter (
{retry}) - Labels:
webhook_name,webhook_reason
stacklok.ai_gateway.webhook.invocations_dropped
Counts observation calls dropped before delivery. queue_full means no slot was
free. Calls the gateway may drop are also shed once the queue is 75% full
(droppable_reserve) or when their workers are at capacity
(droppable_worker_cap).
- Type: Counter (
{invocation}) - Labels:
webhook_name,webhook_drop_reasonwebhook_drop_reason:queue_full,droppable_reserve,droppable_worker_cap
stacklok.ai_gateway.webhook.probes
Counts the reachability checks the gateway sends to each receiver at startup.
- Type: Counter (
{probe}) - Labels:
webhook_name,outcome,webhook_reasonoutcome:success,error
stacklok.ai_gateway.webhook.envelope_oversize
Counts webhook payloads over the receiver's 16 MiB limit and what the gateway did with them.
- Type: Counter (
{envelope}) - Labels:
webhook_name,webhook_oversize_actionwebhook_oversize_action:body_dropped,skipped,refused
stacklok.ai_gateway.webhook.observation_queue.depth
Number of observation calls waiting for delivery. Emitted only when at least one observation hook is configured.
- Type: Gauge (
{fire}) - Labels: None
For webhook configuration, see Enforce model request policy with webhooks.
Request inspection
The gateway reads each request body to pass its content to governance hooks. These counters show requests it couldn't read completely.
| Metric | Type | Unit |
|---|---|---|
stacklok.ai_gateway.lens.unclassified | Counter | {request} |
stacklok.ai_gateway.lens.duplicate_members | Counter | {request} |
stacklok.ai_gateway.lens.unreadable | Counter | {request} |
stacklok.ai_gateway.lens.unclassified
Counts requests that contain content the gateway doesn't recognize, and whether the request proceeded.
- Type: Counter (
{request}) - Labels:
provider,dialect,stage,decisiondialect:openai-chat,anthropic-messages,gemini-generate,openai-responses,gemini-streamstage:initial,mutation,retargetdecision:proceeded,refused,skipped
stacklok.ai_gateway.lens.duplicate_members
Counts requests that repeat a field name in their body.
- Type: Counter (
{request}) - Labels:
provider,dialect
stacklok.ai_gateway.lens.unreadable
Counts requests whose body the gateway couldn't read whole, and what it did next.
- Type: Counter (
{request}) - Labels:
provider,dialect,reason,stage,decisionreason:projection_failed,depth_cut,budget_foldstage:initial,mutation,retargetdecision:refused,hooks_ran,proceeded
Workload trust
These gauges exist only while the gateway is connected to the Enterprise Manager's directory. See Call the AI Gateway from Kubernetes workloads.
| Metric | Type | Unit |
|---|---|---|
stacklok.ai_gateway.workload_trust.installed | Gauge | {trust} |
stacklok.ai_gateway.workload_trust.remaining_validity | Gauge | s |
stacklok.ai_gateway.workload_trust.installed
One series with value 1 for each trusted issuer the gateway currently holds.
- Type: Gauge (
{trust}) - Labels:
authority_id,revision
stacklok.ai_gateway.workload_trust.remaining_validity
Seconds until the gateway's copy of the trusted issuers expires; 0 once it has expired.
- Type: Gauge (
s) - Labels: None
Scanning adapter
The scanning adapter runs the
PCI and PII controls. The scanning and
guardrails adapters serve their metrics in Prometheus format on port 9090 by
default; change it with
scanning.adapter.metrics.port
and
guardrails.adapter.metrics.port.
ai-gateway-v2.scanning.adapter.metrics.enabled and
ai-gateway-v2.guardrails.adapter.metrics.enabled control this: leave them
unset to follow the gateway's telemetry settings, set true to always serve
metrics, or false to turn them off.
| Metric | Type | Unit |
|---|---|---|
stacklok.ai_gateway.pii.detections | Counter | {detection} |
stacklok.ai_gateway.pii.requests_with_detections | Counter | {request} |
stacklok.ai_gateway.pii.unscanned | Counter | {request} |
stacklok.ai_gateway.pii.extraction_failures | Counter | {request} |
aigw.presidio.analyze.duration | Histogram | ms |
stacklok.ai_gateway.presidio.analyze.inflight | UpDownCounter | {call} |
stacklok.ai_gateway.presidio.analyze.queue_wait | Histogram | s |
stacklok.ai_gateway.presidio.analyze.chunks | Histogram | {chunk} |
stacklok.ai_gateway.ner_cache.lookups | Counter | {lookup} |
stacklok.ai_gateway.ner_cache.errors | Counter | {error} |
stacklok.ai_gateway.ner_cache.op_duration | Histogram | s |
stacklok.ai_gateway.ner_cache.withheld_writes | Counter | {write} |
circuitbreaker.requests | Counter | {call} |
circuitbreaker.state_transitions | Counter | {transition} |
circuitbreaker.state | Gauge | None |
stacklok.ai_gateway.pii.detections
Counts sensitive data matches in completed scans.
- Type: Counter (
{detection}) - Labels:
entity_type,action(the action configured for that entity type, including shadow matches),source(the detection provider, such aspresidio)
stacklok.ai_gateway.pii.requests_with_detections
Counts completed scans with at least one match.
- Type: Counter (
{request}) - Labels: None
stacklok.ai_gateway.pii.unscanned
Counts requests let through without a complete scan because the detection provider failed open. A rising rate means traffic is passing unscanned.
- Type: Counter (
{request}) - Labels:
reasonreason:guardrail_circuit_open,guardrail_provider_unavailable,guardrail_transport_error,guardrail_timeout,guardrail_input_too_large
stacklok.ai_gateway.pii.extraction_failures
Counts requests with no readable content to scan, or whose scan was canceled.
- Type: Counter (
{request}) - Labels:
reason,actionreason:no_content,cancelledaction:block
aigw.presidio.analyze.duration
Duration of each call to Presidio. Appears as
aigw_presidio_analyze_duration_milliseconds.
- Type: Histogram (
ms) - Labels:
direction,outcomedirection:request,responseoutcome:success,canceled,error
stacklok.ai_gateway.presidio.analyze.inflight
Presidio calls in progress. Compare it with your Presidio worker count to spot queuing. Appears only after the first call.
- Type: UpDownCounter (
{call}) - Labels:
directiondirection:request,response
stacklok.ai_gateway.presidio.analyze.queue_wait
Time each Presidio call waited before it started.
- Type: Histogram (
s) - Labels:
direction
stacklok.ai_gateway.presidio.analyze.chunks
Number of chunks for each text that was split before scanning.
- Type: Histogram (
{chunk}) - Labels:
direction
stacklok.ai_gateway.ner_cache.lookups
Counts result cache reads. Use the hit rate to measure avoided Presidio calls.
- Type: Counter (
{lookup}) - Labels:
result,directionresult:hit,missdirection:request,response
stacklok.ai_gateway.ner_cache.errors
Counts cache backend and decoding faults. A failed read becomes a miss and a normal Presidio call.
- Type: Counter (
{error}) - Labels:
op,error_typeop:get,seterror_type:timeout,connection,decode,oversize
stacklok.ai_gateway.ner_cache.op_duration
Round-trip time of each cache operation.
- Type: Histogram (
s) - Labels:
op,outcomeop:get,setoutcome:success,error
stacklok.ai_gateway.ner_cache.withheld_writes
Counts scan results the adapter chose not to write to the cache.
- Type: Counter (
{write}) - Labels:
directiondirection:request,response
circuitbreaker.requests
Counts calls through the circuit breaker in front of Presidio. rejected means
the breaker was open.
- Type: Counter (
{call}) - Labels:
name,outcomename:guardrails-provider:presidiooutcome:success,failure,rejected,canceled
circuitbreaker.state_transitions
Counts circuit breaker state changes.
- Type: Counter (
{transition}) - Labels:
name,fromandtofromandto:closed,open,half_open
circuitbreaker.state
Current circuit breaker state: 0 closed, 1 open, 2 half open.
- Type: Gauge
- Labels:
name
The ner_cache metrics appear only when the
scan result cache is
on.
Guardrails adapter
The guardrails adapter runs prompt injection screening.
| Metric | Type | Unit |
|---|---|---|
stacklok.ai_gateway.guardrail.category_detections | Counter | {detection} |
stacklok.ai_gateway.guardrail.unscreenable | Counter | {request} |
stacklok.ai_gateway.verdict_cache.lookups | Counter | {lookup} |
stacklok.ai_gateway.verdict_cache.errors | Counter | {error} |
stacklok.ai_gateway.verdict_cache.op_duration | Histogram | s |
stacklok.ai_gateway.guardrail.category_detections
Counts each category behind a denied prompt. Allowed prompts record nothing.
- Type: Counter (
{detection}) - Labels:
category(the guardrail's filter category, orCUSTOM_WORDfor word filters),policy_typepolicy_type:content,word,topic,sensitive_information,grounding
stacklok.ai_gateway.guardrail.unscreenable
Counts content the guardrail couldn't screen, for allowed and denied prompts alike.
- Type: Counter (
{request}) - Labels:
reasonreason:non_text_media,tool_result,unrecognized_part,unrecognized_shape,no_content
stacklok.ai_gateway.verdict_cache.lookups
Counts verdict cache reads, one per conversation window looked up.
- Type: Counter (
{lookup}) - Labels:
resultresult:hit,miss
stacklok.ai_gateway.verdict_cache.errors
Counts verdict cache backend and decoding faults. A miss or a canceled request isn't a fault.
- Type: Counter (
{error}) - Labels:
op,error_typeop:get,set,dialerror_type:timeout,connection,decode,oversize
stacklok.ai_gateway.verdict_cache.op_duration
Round-trip time of each verdict cache operation. A miss counts as success.
- Type: Histogram (
s) - Labels:
op,outcomeop:get,setoutcome:success,error
The verdict_cache metrics appear only when the adapter screens conversations
in windows of recent turns with a cache it can reach: set
guardrails.screeningWindowTurns
and turn on
guardrails.verdictCache.enabled
with a reachable Redis or Valkey.
Adapter configuration
| Metric | Type | Unit |
|---|---|---|
processor_config_reload_total | Counter | None |
processor_config_reload_total
Counts attempts by an adapter to reload its configuration after the ConfigMap changes. A reload with unchanged content records nothing.
- Type: Counter
- Labels:
resultresult:success,failure
Connector Gateway
Connector Gateway metrics carry no implementation label.
| Metric | Type | Unit |
|---|---|---|
stacklok.connector_gateway.workload_identity.resolutions | Counter | {resolution} |
stacklok.connector_gateway.workload_trust.installed | Gauge | {trust} |
stacklok.connector_gateway.workload_trust.remaining_validity | Gauge | s |
stacklok.connector_gateway.connector_credential.prompts | Counter | {prompt} |
stacklok.connector_gateway.policy_webhook.calls | Counter | {call} |
reauth_challenges_total | Counter | None |
refresh_grants_refused_total | Counter | None |
upstream_credential_unavailable_total | Counter | None |
kek_unsealable_reads_total | Counter | None |
stacklok.connector_gateway.workload_identity.resolutions
Counts MCP requests from Kubernetes workloads whose token names a trusted issuer, by resolution result.
- Type: Counter (
{resolution}) - Labels:
outcomeoutcome:success,token_rejected,identity_unresolved,directory_unavailable
stacklok.connector_gateway.workload_trust.installed
One series with value 1 for each trusted issuer the gateway currently holds.
- Type: Gauge (
{trust}) - Labels:
authority_id,revision
stacklok.connector_gateway.workload_trust.remaining_validity
Seconds until the gateway's copy of the trusted issuers expires; 0 once it has expired.
- Type: Gauge (
s) - Labels: None
stacklok.connector_gateway.connector_credential.prompts
Counts tool calls answered with a prompt for the user to sign in to a connector's provider.
- Type: Counter (
{prompt}) - Labels:
kindkind:url_elicitation,tool_error
stacklok.connector_gateway.policy_webhook.calls
Counts calls to each matching policy webhook per tool call. Emitted only when policy webhooks are configured.
- Type: Counter (
{call}) - Labels:
webhook(the configured webhook name),outcome,failure_policy(fail,ignore; set only whenoutcomeiserror)outcome:success,rejected,error
reauth_challenges_total
Counts 401 responses that ask an MCP client to sign in again, by the reason
the ID token failed.
- Type: Counter
- Labels:
causecause:missing,unparseable,expired,other
refresh_grants_refused_total
Counts refresh token requests the gateway refused because only a new sign-in can fix the session.
- Type: Counter
- Labels:
causecause:missing,unparseable,expired,other,upstream_failed
upstream_credential_unavailable_total
Counts identity provider credentials left out of a request because they were missing, expired, or failed to refresh.
- Type: Counter
- Labels:
reason,provider_id(the identity provider name),error_class(invalid_grant,row_removed,oauth_error,identity,no_refresh_token,timeout,network,other; set only for the threerefresh_*reasons)reason:no_refresh_token,session_expired,refresh_rejected,refresh_refused,refresh_transient
kek_unsealable_reads_total
Counts reads of stored credentials sealed under a key version that is no longer in the keyring. See Rotate the Connector Gateway encryption key.
- Type: Counter
- Labels:
version(the key version number)
The workload_identity and workload_trust metrics appear only while the
gateway accepts service account workloads; see
Accept service account workloads.
The last four counters don't use the stacklok. prefix, and Prometheus shows
them under the names listed.
Enterprise Manager
Some Enterprise Manager work runs only on the replica that holds leadership. Metrics for that work, marked leader only below, appear only on that pod.
Configuration server
The configuration server signs and serves client configuration to the Stacklok CLI.
| Metric | Type | Unit |
|---|---|---|
stacklok.enterprise_manager.config_server.requests | Counter | {request} |
stacklok.enterprise_manager.config_server.jws_sign.duration | Histogram | s |
stacklok.enterprise_manager.config_server.requests
Counts configuration server requests by operation and result.
- Type: Counter (
{request}) - Labels:
outcome,operation,error_typeoutcome:success,rejected,erroroperation:jwks,oauth_metadata,config_fetcherror_type:signing_not_configured,marshal_failed,resource_not_configured,missing_client_type,invalid_client_type,missing_client_version,invalid_client_version,sign_failed; set only on failure
stacklok.enterprise_manager.config_server.jws_sign.duration
Time to sign each configuration envelope.
- Type: Histogram (
s) - Labels: None
Platform administration
| Metric | Type | Unit |
|---|---|---|
stacklok.enterprise_manager.platform.admin_denials | Counter | {request} |
stacklok.enterprise_manager.platform.admin_denials
Counts 403 responses to requests that need platform administrator rights.
- Type: Counter (
{request}) - Labels:
reasonreason:distributed_claim,not_granted
Directory
Directory metrics use two prefixes: stacklok.directory. for managed secrets
and the connector catalog that gateways read, and
stacklok.enterprise_manager.directory. for everything else.
stacklok.directory.catalog.omitted_records
Counts stored records left out of a catalog read by a gateway. Increments only when a read drops at least one record.
- Type: Counter (
{record}) - Labels:
reason,rpcreason:dangling_reference,unmappable,reserved_secret_ref,primary_idp_unavailablerpc:ListAllConnectors,GetConnectorForSetup,ListAllIdentityProviders
stacklok.directory.managed_secrets.rows
Leader only. Number of managed secrets sealed under each key version, updated after each rewrap pass (every 5 minutes by default).
- Type: Gauge (
{row}) - Labels:
kek_version
stacklok.directory.managed_secrets.rewrap_sweeps
Leader only. Counts passes that reseal managed secrets under the active key version.
- Type: Counter (
{cycle}) - Labels:
outcomeoutcome:success,error,degraded
stacklok.enterprise_manager.directory.connection.mutations
Counts API calls that create, update, or delete a user's connector connection.
- Type: Counter (
{mutation}) - Labels:
outcome,operationoutcome:success,rejected,erroroperation:create,update,delete
stacklok.enterprise_manager.directory.connection.token_revocations
Counts decisions to revoke, or skip revoking, a provider token when a connection is removed.
- Type: Counter (
{revocation}) - Labels:
outcome,reason,operationoutcome:success,error,skippedreason:none,unconfigured,other_gateway,unresolvable_provider,still_usedoperation:disconnect,connector_delete
stacklok.enterprise_manager.directory.connector.mutations
Counts API calls that create, update, or delete a connector.
- Type: Counter (
{mutation}) - Labels:
outcome,operationoutcome:success,rejected,erroroperation:create,update,delete
stacklok.enterprise_manager.directory.group.policy_changes
Counts grants and revocations of a directory group's access to a connector.
- Type: Counter (
{change}) - Labels:
outcome,operationoperation:grant,revoke
stacklok.enterprise_manager.directory.credential.resolutions
Counts lookups of a connector's stored secret, successful ones included.
- Type: Counter (
{resolution}) - Labels:
outcome,secret_kindoutcome:success,rejected,errorsecret_kind:managed_secret,kubernetes_secret,vault_secret,unknown
stacklok.enterprise_manager.directory.workload.resolutions
Counts attempts to resolve a Kubernetes workload to a service account.
- Type: Counter (
{resolution}) - Labels:
outcome,reasonoutcome:success,rejected,errorreason:invalid_coordinate,subject_mismatch,trust_unknown,trust_disabled,profile_mismatch,no_binding,account_inactive; set only when rejected
stacklok.enterprise_manager.directory.scim.requests
Counts SCIM provisioning requests.
- Type: Counter (
{request}) - Labels:
outcome,operation,resource_typeoperation:create,update,delete,patchresource_type:user,group
stacklok.enterprise_manager.directory.okta.cycles
Leader only. Counts
Okta directory sync cycles. A
rejected cycle means a safety check stopped the sync.
- Type: Counter (
{cycle}) - Labels:
issuer_id,outcome,reasonoutcome:success,rejected,errorreason:empty_desired_population,deactivation_ratio_exceeded; set only when rejected
stacklok.enterprise_manager.directory.okta.cycle.duration
Leader only. Duration of each Okta sync cycle.
- Type: Histogram (
s) - Labels:
issuer_id,outcome
stacklok.enterprise_manager.directory.okta.mutations
Leader only. Counts directory changes each Okta sync cycle makes.
- Type: Counter (
{write}) - Labels:
issuer_id,operationoperation:user_create,user_replace,user_activate,user_deactivate,group_create,group_replace,group_clear,member_add,member_remove
stacklok.enterprise_manager.directory.okta.last_success.age
Leader only. Seconds since the last successful Okta sync cycle. Absent until a cycle succeeds.
- Type: Gauge (
s) - Labels:
issuer_id
stacklok.enterprise_manager.directory.variable_group.reconciliations
Leader only. Counts passes that rebuild groups from group_variables
attributes, hourly by default.
- Type: Counter (
{cycle}) - Labels:
outcomeoutcome:success,error
stacklok.enterprise_manager.directory.variable_group.skipped_values
Leader only. Counts user attribute values those passes couldn't turn into a group.
- Type: Counter (
{value}) - Labels:
skip_reasonskip_reason:not_string,too_long,empty
The managed_secrets metrics appear only when an encryption key is configured.
Because managed_secrets.rows repeats its last value until the process exits,
zero rows alone doesn't show that a key version can be retired. Check for zero
rows together with a recent increase in managed_secrets.rewrap_sweeps with
outcome="success", aggregating both across pods with max by because
non-leader pods don't report them, and confirm that no replica started before
the rotation is still running. For the full procedure, see
Retire an old version.
For group_variables, see
Configure SCIM provisioning.
Budgets
These metrics cover budgets and pricing for the AI Gateway.
| Metric | Type | Unit |
|---|---|---|
stacklok.enterprise_manager.budget.admit.decisions | Counter | {decision} |
stacklok.enterprise_manager.budget.observation.duration | Histogram | s |
stacklok.enterprise_manager.budget.usage_events.recorded | Counter | {event} |
stacklok.enterprise_manager.budget.pricing.entries | Gauge | {entry} |
stacklok.enterprise_manager.budget.pricing.rate_fallbacks | Counter | {fallback} |
stacklok.enterprise_manager.budget.disconnect_limit.disconnects | Counter | {disconnect} |
stacklok.enterprise_manager.budget.disconnect_limit.denies | Counter | {request} |
stacklok.enterprise_manager.budget.disconnect_limit.resets | Counter | {reset} |
stacklok.enterprise_manager.budget.admit.decisions
Counts budget checks on model requests and why a request was refused.
- Type: Counter (
{decision}) - Labels:
outcome,reasonoutcome:success,rejected,errorreason:budget_exhausted,ungoverned,unpriceable_model,disconnect_limit; set only when rejected
stacklok.enterprise_manager.budget.observation.duration
Time to record the cost of each finished interaction.
- Type: Histogram (
s) - Labels:
outcome
stacklok.enterprise_manager.budget.usage_events.recorded
Counts attempts to store a usage event.
- Type: Counter (
{event}) - Labels:
outcome
stacklok.enterprise_manager.budget.pricing.entries
Number of model prices by source, written at startup and whenever pricing changes.
- Type: Gauge (
{entry}) - Labels:
managed_bymanaged_by:baseline,operator,unowned
stacklok.enterprise_manager.budget.pricing.rate_fallbacks
Counts charges that used a fallback rate because the model's price lacks a specific rate.
- Type: Counter (
{fallback}) - Labels:
price_format,rate(the fallback rule applied, such ascachedInput->input)price_format:anthropic,openai,google
stacklok.enterprise_manager.budget.disconnect_limit.disconnects
Counts interactions the client canceled that count toward the disconnect limit, by how much usage the provider reported.
- Type: Counter (
{disconnect}) - Labels:
usageusage:absent,input_only,with_output
stacklok.enterprise_manager.budget.disconnect_limit.denies
Counts requests from a caller at the disconnect limit. In observe mode these
are requests the limit would have refused.
- Type: Counter (
{request}) - Labels:
modemode:observe,enforce
stacklok.enterprise_manager.budget.disconnect_limit.resets
Counts administrator resets of a caller's disconnect count.
- Type: Counter (
{reset}) - Labels: None
The disconnect limit caps how many canceled streams one user or service account
can produce per period. Configure it with budgets.disconnectLimit under the
Enterprise Manager's appConfig
value.
Metering
These metrics cover the tool call records behind the Tool Usage screen.
| Metric | Type | Unit |
|---|---|---|
stacklok.enterprise_manager.metering.ingest.requests | Counter | {request} |
stacklok.enterprise_manager.metering.ingest.batch_size | Histogram | {record} |
stacklok.enterprise_manager.metering.checkpoint.duration | Histogram | s |
stacklok.enterprise_manager.metering.ingest.requests
Counts batches of tool call records the Connector Gateway delivers.
- Type: Counter (
{request}) - Labels:
outcomeoutcome:success,error
stacklok.enterprise_manager.metering.ingest.batch_size
Number of records accepted in each successful batch.
- Type: Histogram (
{record}) - Labels: None
stacklok.enterprise_manager.metering.checkpoint.duration
Leader only. Duration of each periodic integrity checkpoint over stored records.
- Type: Histogram (
s) - Labels:
outcomeoutcome:success,error
HTTP and gRPC servers
| Metric | Type | Unit |
|---|---|---|
http.server.request.duration | Histogram | s |
http.server.active_requests | UpDownCounter | {request} |
rpc.server.duration | Histogram | ms |
http.server.request.duration
Duration of every request to the Enterprise Manager's HTTP API, including requests refused by authentication.
- Type: Histogram (
s) - Labels:
http.request.method,url.scheme,http.route(the route pattern, orunknown_route),http.response.status_codeurl.scheme:http,https
http.server.active_requests
HTTP requests in progress. Appears as http_server_active_requests.
- Type: UpDownCounter (
{request}) - Labels:
http.request.method,url.scheme
rpc.server.duration
Duration of every gRPC call, such as the gateways' directory lookups. Appears as
rpc_server_duration_milliseconds.
- Type: Histogram (
ms) - Labels:
rpc.system,rpc.service,rpc.method,rpc.grpc.status_coderpc.system:grpc
The /metrics endpoint also serves the standard controller-runtime metrics for
the Enterprise Manager's Kubernetes controllers, such as
controller_runtime_reconcile_total,
controller_runtime_reconcile_errors_total, and
controller_runtime_reconcile_time_seconds.
Shared metrics
| Metric | Type | Unit |
|---|---|---|
stacklok.build_info | Gauge | 1 |
stacklok.build_info
Always 1. Identifies the running version of the Enterprise Manager and the
Registry Server. The Registry Server emits it only when its metrics are on.
Appears as stacklok_build_info_ratio.
- Type: Gauge (
1) - Labels:
component,version,commitcomponent:enterprise_manager,registry
Next steps
- Deploy the platform to install the components that emit these metrics.
- Collect gateway telemetry to scrape or push AI Gateway metrics.
Related information
- Collect Connector Gateway telemetry - Prometheus and OTLP settings for the Connector Gateway
- Telemetry and metrics - metrics for MCP servers that the ToolHive Operator runs