Skip to main content
The Splunk connector is an Enterprise feature. It requires a Bifrost Enterprise license.

Overview

The Splunk connector forwards completed Bifrost request traces to Splunk over the HTTP Event Collector (HEC). It is a hybrid connector that emits two things from the same trace:
  • Events: one flattened event per LLM request, written to a Splunk event index. Each event carries the request’s provider, model, status, token counts, cost, latency, attribution, and optionally the prompt/response content.
  • Metrics: the full Bifrost metric set (requests, tokens, latency, cost, and more), written to a Splunk metrics index as HEC metric events.
Use the Splunk connector when Splunk is your system of record and you want LLM traffic searchable in SPL alongside the rest of your operational and security data, without standing up a separate pipeline. Key benefits:
  • One connector, both signals: searchable events for investigation and drill-down, plus metrics for dashboards and alerting.
  • Native SPL: events land as flat, top-level fields, so index=bifrost_llm status=error works with no field extraction to configure.
  • Cost-aware: Splunk is priced on ingest volume, and events include prompt/response content by default, so set disable_content_logging: true for a leaner metadata-only feed when you don’t need the bodies.
This connector targets Splunk Enterprise / Splunk Cloud via HEC, not Splunk Observability Cloud. It ships flat events and metrics, and does not produce an APM-style trace waterfall. If you need distributed-trace spans in Splunk Observability Cloud, use the OTel connector pointed at an OTLP collector instead.

How it works

After each request completes, the connector builds one flattened event from the trace’s final-attempt span plus trace-level attributes, and derives the metric set. Both are delivered asynchronously over HEC, so they add zero latency to the request path. Events and metrics are batched internally and flushed by size (batch_max_bytes) and time (flush_interval_ms), then gzipped and POSTed by a small worker pool. Events go to POST <endpoint>/services/collector/event; metrics go to POST <endpoint>/services/collector as metric-typed HEC events. By default, delivery is fire-and-forget: if Splunk is slow or unreachable, packets are dropped rather than stalling requests. Enable indexer acknowledgement for confirmed, at-least-once delivery.
Splunk event indexes and metrics indexes are different index types and are not interchangeable. You need one of each: an event index for the per-request events and a metrics index for the derived metrics.

Prerequisites

Before configuring the connector, set up Splunk:
  1. Enable HEC and create a token (Settings → Data inputs → HTTP Event Collector). The token value is sent as Authorization: Splunk <token>.
  2. Create two indexes: an event index (e.g. bifrost_llm) and a metrics index (e.g. bifrost_metrics).
  3. Scope the token to only these two indexes. Don’t leave it unrestricted: an unscoped HEC token can write to any index in the deployment if the token leaks. Use separate tokens for other data producers.

Setup

  1. Navigate to Observability in the sidebar.
  2. Select Splunk from the connector list.
  3. Enter the HEC Endpoint (e.g. https://localhost:8088, without the /services/collector path) and the HEC Token.
  4. Set the Event Index and, with metrics enabled, the Metrics Index.
  5. Configure optional settings: source, sourcetype, host, TLS (CA certificate or skip-verify), request headers, and custom fields.
  6. Toggle Enabled on, then click Save Splunk Configuration.
Splunk connector configuration in the Bifrost Observability page

Configuration reference

Events and metrics are independent. Run metrics-only by setting enable_events: false (then events_index is not required), or events-only with enable_metrics: false (then metrics_index is not required). At least one of the two must be enabled.

Searching your data

Events and metrics live in different index types, so they are queried differently. Events: a normal search against the event index:
Each event exposes flat, top-level fields: request_id, trace_id, provider, model, status, input_tokens, output_tokens, total_tokens, cost, latency_ms, and attribution fields. Metrics: use mstats (note the leading pipe and the metric_name filter, both required):
To break a single metric down by dimension:

TLS

HEC is served over HTTPS. The connector verifies the server certificate against the system CA pool by default. For an on-prem HEC that uses a self-signed or private-CA certificate, you have two options:
  • ca_cert (recommended): supply the PEM-encoded CA certificate so the self-signed/private-CA endpoint is trusted while verification stays on:
  • insecure_skip_verify (development / isolated environments only): disable verification entirely. This encrypts the connection but does not authenticate it, leaving it open to man-in-the-middle attacks. Not for production, use ca_cert instead.
insecure_skip_verify takes precedence over ca_cert: when it is enabled, verification is off and ca_cert is ignored. Prefer ca_cert in production, and always reference it via an environment variable (env.SPLUNK_CA_CERT) rather than embedding PEM text directly in config.json or the database.

Indexer acknowledgement

By default the connector delivers over HEC fire-and-forget: once Splunk returns 200, the batch is considered sent. If your HEC token has indexer acknowledgement enabled, Splunk requires every request to carry a channel and confirms data only once it is indexed to disk. Set indexer_ack: true to turn this on. With acknowledgement enabled, the connector:
  • Sends a per-instance channel (X-Splunk-Request-Channel) on every request.
  • Tracks each batch’s ackId and polls POST <endpoint>/services/collector/ack (every ack_poll_interval_ms) until Splunk confirms the batch was indexed.
  • Resends a batch that is not acknowledged within ack_timeout_ms, up to max_ack_attempts times, then drops it.
Enable indexer_ack only when the HEC token actually has indexer acknowledgement turned on. An ack-enabled token rejects requests that lack a channel, so leaving this off against such a token drops all delivery; conversely, a non-ack token returns no ackId, so turning it on adds overhead with nothing to confirm.
Acknowledgement trades a little overhead (per-channel poll traffic, plus unacknowledged batches held in memory until confirmed) for delivery confirmation. Delivery stays at-least-once: only unacknowledged batches are resent, so duplicates are rare but possible if an acknowledgement is lost after indexing. Leave acknowledgement off unless your token requires it or you need indexing confirmation.

Attribution fields

Bifrost attributes each request to a virtual key, user, team, customer, and business unit. Because a request can be attributed to a set (multi-tenant), the connector shapes attribution differently for events and metrics:
  • Events carry one multi-value field per dimension (team_ids, team_names, customer_ids, customer_names, business_unit_ids, business_unit_names) as native JSON arrays, so customer_ids=acme matches a member of the set. Virtual-key and user attribution stay scalar (virtual_key_id, virtual_key_name, user_id, user_name).
  • Metrics dimensions must be scalar (a comma-joined value would break mstats ... BY), so metric dimensions keep the singular form (customer_id, team_id, …). Multi-tenant metric attribution reflects the primary tenant only.
The event field names (*_ids / *_names) are Splunk-specific and differ from the singular tags used by other connectors. Build your SPL against the plural, multi-value field names.

Metrics reference

With enable_metrics on, the connector emits the following metrics to the metrics index. Metric names match the Bifrost metric contract used across connectors. Every metric also carries your configured custom_fields and the scalar attribution dimensions.

Controlling exported content

By default, events include prompt and response content. Because Splunk is priced on ingest volume, set disable_content_logging: true to drop message content from events before they are sent:
Input and output messages, prompt/instructions, embedding inputs, reasoning, and tool definitions/calls/results are dropped. Metadata is still exported (model, provider, tokens, cost, latency, status, and attribution), so metrics and dashboards are unaffected.
This flag is independent of the global client.disable_content_logging, which governs the Bifrost log store only. Setting the client flag does not stop content from reaching Splunk; set disable_content_logging on the Splunk connector as well.It also does not cover attribution identifiers, which remain on events and metrics. Values captured via request_headers are attached regardless of this flag, so only enable header capture for headers you intend to export. Prefer an explicit allowlist of exact header names: wildcard patterns (*, x-custom-*) can export sensitive headers such as Authorization.

Troubleshooting

No events in the event index

  • Confirm enable_events is true and events_index names an existing event index.
  • Check the Bifrost logs for HEC errors (bad token, disallowed index, TLS failure).
  • Widen the Splunk time picker to All time before assuming nothing arrived.

No metrics in the metrics index

  • Confirm enable_metrics is true and metrics_index names an existing metrics index (not an event index).
  • Metric searches need the leading pipe and a metric_name filter: | mstats ... WHERE index=bifrost_metrics AND metric_name=* BY metric_name. Without them Splunk returns an error or no results.

TLS / certificate errors

  • For a self-signed or private-CA HEC, set ca_cert to the PEM certificate. If verification fails with a hostname mismatch (e.g. certificate is not valid for localhost), the server certificate’s SAN does not cover the host you are connecting to.

Next steps

  • Kafka connector: stream raw JSON traces to a Kafka topic
  • OTel connector: OpenTelemetry export, including to Splunk Observability Cloud via an OTLP collector
  • Content logging: how content export is controlled across connectors