Skip to main content

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, 9464 by default (set with telemetry.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 /metrics on port 8080, and can also push them over OTLP when you set telemetry.otlp.enabled. The Enterprise Manager's gRPC NetworkPolicy (grpc.networkPolicy.enabled, required with directory.kek.enabled) doesn't admit port 8080. While it applies, add your own NetworkPolicy that lets Prometheus reach port 8080.

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 _total keeps it once.
  • Unit s adds _seconds, and unit ms adds _milliseconds.
  • Gauges with unit 1 add _ratio.
  • Units in braces, such as {request}, describe what is counted and add no suffix.
  • Histograms appear as _bucket, _sum, and _count series.

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​

MetricTypeUnit
http.server.request.durationHistograms
stacklok.ai_gateway.interaction.requestsCounter{request}
stacklok.ai_gateway.request.overheadHistograms
stacklok.ai_gateway.client.writeHistograms
stacklok.ai_gateway.provider.durationHistograms
stacklok.ai_gateway.provider.time_to_first_byteHistograms
gen_ai.server.request.durationHistograms
gen_ai.server.time_to_first_tokenHistograms
stacklok.ai_gateway.token.usageCounter{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, or unknown_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: outcome
    • outcome: 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, outcome
    • outcome: 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 claims
    • token_type: input, output
    • cache_type: uncached, cache_read, cache_creation; input tokens only

Governance hooks and policy webhooks​

MetricTypeUnit
stacklok.ai_gateway.hook.invocationsCounter{invocation}
stacklok.ai_gateway.hook.durationHistograms
stacklok.ai_gateway.governance.denialsCounter{denial}
stacklok.ai_gateway.webhook.invocationsCounter{invocation}
stacklok.ai_gateway.webhook.durationHistogramms
stacklok.ai_gateway.webhook.retriesCounter{retry}
stacklok.ai_gateway.webhook.invocations_droppedCounter{invocation}
stacklok.ai_gateway.webhook.probesCounter{probe}
stacklok.ai_gateway.webhook.envelope_oversizeCounter{envelope}
stacklok.ai_gateway.webhook.observation_queue.depthGauge{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, outcome
    • hook_enforcement: required, observation
    • outcome: 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, kind
    • hook_enforcement: required, observation
    • kind: 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_reason
    • webhook_phase: Request, Response
    • webhook_type: Validating, Observation
    • webhook_outcome: admit, deny, disabled, failure
    • webhook_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_reason
    • webhook_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_reason
    • outcome: 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_action
    • webhook_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.

MetricTypeUnit
stacklok.ai_gateway.lens.unclassifiedCounter{request}
stacklok.ai_gateway.lens.duplicate_membersCounter{request}
stacklok.ai_gateway.lens.unreadableCounter{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, decision
    • dialect: openai-chat, anthropic-messages, gemini-generate, openai-responses, gemini-stream
    • stage: initial, mutation, retarget
    • decision: 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, decision
    • reason: projection_failed, depth_cut, budget_fold
    • stage: initial, mutation, retarget
    • decision: 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.

MetricTypeUnit
stacklok.ai_gateway.workload_trust.installedGauge{trust}
stacklok.ai_gateway.workload_trust.remaining_validityGauges

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.

MetricTypeUnit
stacklok.ai_gateway.pii.detectionsCounter{detection}
stacklok.ai_gateway.pii.requests_with_detectionsCounter{request}
stacklok.ai_gateway.pii.unscannedCounter{request}
stacklok.ai_gateway.pii.extraction_failuresCounter{request}
aigw.presidio.analyze.durationHistogramms
stacklok.ai_gateway.presidio.analyze.inflightUpDownCounter{call}
stacklok.ai_gateway.presidio.analyze.queue_waitHistograms
stacklok.ai_gateway.presidio.analyze.chunksHistogram{chunk}
stacklok.ai_gateway.ner_cache.lookupsCounter{lookup}
stacklok.ai_gateway.ner_cache.errorsCounter{error}
stacklok.ai_gateway.ner_cache.op_durationHistograms
stacklok.ai_gateway.ner_cache.withheld_writesCounter{write}
circuitbreaker.requestsCounter{call}
circuitbreaker.state_transitionsCounter{transition}
circuitbreaker.stateGaugeNone

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 as presidio)

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: reason
    • reason: 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, action
    • reason: no_content, cancelled
    • action: block

aigw.presidio.analyze.duration​

Duration of each call to Presidio. Appears as aigw_presidio_analyze_duration_milliseconds.

  • Type: Histogram (ms)
  • Labels: direction, outcome
    • direction: request, response
    • outcome: 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: direction
    • direction: 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, direction
    • result: hit, miss
    • direction: 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_type
    • op: get, set
    • error_type: timeout, connection, decode, oversize

stacklok.ai_gateway.ner_cache.op_duration​

Round-trip time of each cache operation.

  • Type: Histogram (s)
  • Labels: op, outcome
    • op: get, set
    • outcome: 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: direction
    • direction: 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, outcome
    • name: guardrails-provider:presidio
    • outcome: success, failure, rejected, canceled

circuitbreaker.state_transitions​

Counts circuit breaker state changes.

  • Type: Counter ({transition})
  • Labels: name, from and to
    • from and to: 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.

MetricTypeUnit
stacklok.ai_gateway.guardrail.category_detectionsCounter{detection}
stacklok.ai_gateway.guardrail.unscreenableCounter{request}
stacklok.ai_gateway.verdict_cache.lookupsCounter{lookup}
stacklok.ai_gateway.verdict_cache.errorsCounter{error}
stacklok.ai_gateway.verdict_cache.op_durationHistograms

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, or CUSTOM_WORD for word filters), policy_type
    • policy_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: reason
    • reason: 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: result
    • result: 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_type
    • op: get, set, dial
    • error_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, outcome
    • op: get, set
    • outcome: 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​

MetricTypeUnit
processor_config_reload_totalCounterNone

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: result
    • result: success, failure

Connector Gateway​

Connector Gateway metrics carry no implementation label.

MetricTypeUnit
stacklok.connector_gateway.workload_identity.resolutionsCounter{resolution}
stacklok.connector_gateway.workload_trust.installedGauge{trust}
stacklok.connector_gateway.workload_trust.remaining_validityGauges
stacklok.connector_gateway.connector_credential.promptsCounter{prompt}
stacklok.connector_gateway.policy_webhook.callsCounter{call}
reauth_challenges_totalCounterNone
refresh_grants_refused_totalCounterNone
upstream_credential_unavailable_totalCounterNone
kek_unsealable_reads_totalCounterNone

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: outcome
    • outcome: 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: kind
    • kind: 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 when outcome is error)
    • 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: cause
    • cause: 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: cause
    • cause: 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 three refresh_* 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.

MetricTypeUnit
stacklok.enterprise_manager.config_server.requestsCounter{request}
stacklok.enterprise_manager.config_server.jws_sign.durationHistograms

stacklok.enterprise_manager.config_server.requests​

Counts configuration server requests by operation and result.

  • Type: Counter ({request})
  • Labels: outcome, operation, error_type
    • outcome: success, rejected, error
    • operation: jwks, oauth_metadata, config_fetch
    • error_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​

MetricTypeUnit
stacklok.enterprise_manager.platform.admin_denialsCounter{request}

stacklok.enterprise_manager.platform.admin_denials​

Counts 403 responses to requests that need platform administrator rights.

  • Type: Counter ({request})
  • Labels: reason
    • reason: 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.

MetricTypeUnit
stacklok.directory.catalog.omitted_recordsCounter{record}
stacklok.directory.managed_secrets.rowsGauge{row}
stacklok.directory.managed_secrets.rewrap_sweepsCounter{cycle}
stacklok.enterprise_manager.directory.connection.mutationsCounter{mutation}
stacklok.enterprise_manager.directory.connection.token_revocationsCounter{revocation}
stacklok.enterprise_manager.directory.connector.mutationsCounter{mutation}
stacklok.enterprise_manager.directory.group.policy_changesCounter{change}
stacklok.enterprise_manager.directory.credential.resolutionsCounter{resolution}
stacklok.enterprise_manager.directory.workload.resolutionsCounter{resolution}
stacklok.enterprise_manager.directory.scim.requestsCounter{request}
stacklok.enterprise_manager.directory.okta.cyclesCounter{cycle}
stacklok.enterprise_manager.directory.okta.cycle.durationHistograms
stacklok.enterprise_manager.directory.okta.mutationsCounter{write}
stacklok.enterprise_manager.directory.okta.last_success.ageGauges
stacklok.enterprise_manager.directory.variable_group.reconciliationsCounter{cycle}
stacklok.enterprise_manager.directory.variable_group.skipped_valuesCounter{value}

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, rpc
    • reason: dangling_reference, unmappable, reserved_secret_ref, primary_idp_unavailable
    • rpc: 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: outcome
    • outcome: 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, operation
    • outcome: success, rejected, error
    • operation: 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, operation
    • outcome: success, error, skipped
    • reason: none, unconfigured, other_gateway, unresolvable_provider, still_used
    • operation: disconnect, connector_delete

stacklok.enterprise_manager.directory.connector.mutations​

Counts API calls that create, update, or delete a connector.

  • Type: Counter ({mutation})
  • Labels: outcome, operation
    • outcome: success, rejected, error
    • operation: 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, operation
    • operation: 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_kind
    • outcome: success, rejected, error
    • secret_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, reason
    • outcome: success, rejected, error
    • reason: 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_type
    • operation: create, update, delete, patch
    • resource_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, reason
    • outcome: success, rejected, error
    • reason: 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, operation
    • operation: 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: outcome
    • outcome: 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_reason
    • skip_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.

MetricTypeUnit
stacklok.enterprise_manager.budget.admit.decisionsCounter{decision}
stacklok.enterprise_manager.budget.observation.durationHistograms
stacklok.enterprise_manager.budget.usage_events.recordedCounter{event}
stacklok.enterprise_manager.budget.pricing.entriesGauge{entry}
stacklok.enterprise_manager.budget.pricing.rate_fallbacksCounter{fallback}
stacklok.enterprise_manager.budget.disconnect_limit.disconnectsCounter{disconnect}
stacklok.enterprise_manager.budget.disconnect_limit.deniesCounter{request}
stacklok.enterprise_manager.budget.disconnect_limit.resetsCounter{reset}

stacklok.enterprise_manager.budget.admit.decisions​

Counts budget checks on model requests and why a request was refused.

  • Type: Counter ({decision})
  • Labels: outcome, reason
    • outcome: success, rejected, error
    • reason: 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_by
    • managed_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 as cachedInput->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: usage
    • usage: 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: mode
    • mode: 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.

MetricTypeUnit
stacklok.enterprise_manager.metering.ingest.requestsCounter{request}
stacklok.enterprise_manager.metering.ingest.batch_sizeHistogram{record}
stacklok.enterprise_manager.metering.checkpoint.durationHistograms

stacklok.enterprise_manager.metering.ingest.requests​

Counts batches of tool call records the Connector Gateway delivers.

  • Type: Counter ({request})
  • Labels: outcome
    • outcome: 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: outcome
    • outcome: success, error

HTTP and gRPC servers​

MetricTypeUnit
http.server.request.durationHistograms
http.server.active_requestsUpDownCounter{request}
rpc.server.durationHistogramms

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, or unknown_route), http.response.status_code
    • url.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_code
    • rpc.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​

MetricTypeUnit
stacklok.build_infoGauge1

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, commit
    • component: enterprise_manager, registry

Next steps​