Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
| image.registry | string | Set the default image registry.<br/><br/>The default value is `"cr.agentgateway.dev"`. |
| image.tag | string | Set the default image tag.<br/><br/>The default value is `""`. |
| imagePullSecrets | list | Set a list of image pull secrets for Kubernetes to use when pulling container images from your own private registry instead of the default agentgateway registry.<br/><br/>The default value is `[]`. |
| inferenceExtension | object | Configure the integration with the Gateway API Inference Extension project, which lets you use agentgateway to route to AI inference workloads like LLMs that run locally in your Kubernetes cluster. Documentation for Inference Extension can be found here: https://agentgateway.dev/docs/kubernetes/latest/documentation/inference/.<br/><br/>The default value is `{"enabled":false}`. |
| inferenceExtension | object | Configure the integration with the Gateway API Inference Extension project, which lets you use agentgateway to route to AI inference workloads like LLMs that run locally in your Kubernetes cluster. Documentation for Inference Extension can be found here: https://agentgateway.dev/docs/kubernetes/latest/documentation/llm/inference/.<br/><br/>The default value is `{"enabled":false}`. |
| inferenceExtension.enabled | bool | Enable Inference Extension support in the agentgateway controller.<br/><br/>The default value is `false`. |
| istio | object | Control-plane-wide Istio mesh defaults.<br/><br/>The default value is `{"autoEnabled":false,"caAddress":"","clusterId":"","namespace":"","network":"","revision":""}`. |
| istio.autoEnabled | bool | Enable Istio integration by default on all built-in-class gateways. When false (default), gateways opt in via AgentgatewayParameters spec.istio; when true, individual gateways can opt out via spec.istio.enabled=false.<br/><br/>The default value is `false`. |
Expand Down
4 changes: 2 additions & 2 deletions assets/agw-docs/pages/reference/helm/main/agentgateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
| controller.xds.mode | string | One of: plaintext, tls, either.<br/><br/>The default value is `"tls"`. |
| controllerName | string | Value written to GatewayClass.spec.controllerName that this controller reconciles. Leave empty to use the built-in default ("agentgateway.dev/agentgateway"). Sets AGW_CONTROLLER_NAME. Change this together with gatewayClassName when running multiple agentgateway controllers.<br/><br/>The default value is `""`. |
| deploymentAnnotations | object | Add annotations to the agentgateway deployment.<br/><br/>The default value is `{}`. |
| discoveryNamespaceSelectors | list | List of namespace selectors (OR'ed): each entry can use 'matchLabels' or 'matchExpressions' (AND'ed within each entry if used together). Agentgateway includes the selected namespaces in config discovery. For more information, see the docs https://agentgateway.dev/docs/kubernetes/latest/install/advanced/#namespace-discovery.<br/><br/>The default value is `[]`. |
| discoveryNamespaceSelectors | list | List of namespace selectors (OR'ed): each entry can use 'matchLabels' or 'matchExpressions' (AND'ed within each entry if used together). Agentgateway includes the selected namespaces in config discovery. For more information, see the docs https://agentgateway.dev/docs/kubernetes/latest/documentation/install/advanced/#namespace-discovery.<br/><br/>The default value is `[]`. |
| dnsConfig | object | Set the pod DNS configuration, such as 'options: [{name: ndots, value: "3"}]'. Merged with the DNS settings the kubelet derives from the pod's dnsPolicy.<br/><br/>The default value is `{}`. |
| fullnameOverride | string | Override the full name of resources created by the Helm chart, which is 'agentgateway'. If you set 'fullnameOverride: "foo", the full name of the resources that the Helm release creates become 'foo', such as the deployment, service, and service account for the agentgateway control plane in the agentgateway-system namespace.<br/><br/>The default value is `""`. |
| gatewayClassName | string | Name of the primary GatewayClass the controller creates and manages. Leave empty to use the built-in default ("agentgateway"). Sets AGW_AGENTGATEWAY_CLASS_NAME.<br/><br/>The default value is `""`. |
Expand All @@ -62,7 +62,7 @@
| image.registry | string | Set the default image registry.<br/><br/>The default value is `"cr.agentgateway.dev"`. |
| image.tag | string | Set the default image tag.<br/><br/>The default value is `""`. |
| imagePullSecrets | list | Set a list of image pull secrets for Kubernetes to use when pulling container images from your own private registry instead of the default agentgateway registry.<br/><br/>The default value is `[]`. |
| inferenceExtension | object | Configure the integration with the Gateway API Inference Extension project, which lets you use agentgateway to route to AI inference workloads like LLMs that run locally in your Kubernetes cluster. Documentation for Inference Extension can be found here: https://agentgateway.dev/docs/kubernetes/latest/inference/.<br/><br/>The default value is `{"enabled":false}`. |
| inferenceExtension | object | Configure the integration with the Gateway API Inference Extension project, which lets you use agentgateway to route to AI inference workloads like LLMs that run locally in your Kubernetes cluster. Documentation for Inference Extension can be found here: https://agentgateway.dev/docs/kubernetes/latest/documentation/llm/inference/.<br/><br/>The default value is `{"enabled":false}`. |
| inferenceExtension.enabled | bool | Enable Inference Extension support in the agentgateway controller.<br/><br/>The default value is `false`. |
| istio | object | Control-plane-wide Istio mesh defaults.<br/><br/>The default value is `{"autoEnabled":false,"caAddress":"","clusterId":"","enabled":true,"namespace":"","network":"","revision":""}`. |
| istio.autoEnabled | bool | Enable Istio integration by default on all built-in-class gateways. When false (default), gateways opt in via AgentgatewayParameters spec.istio; when true, individual gateways can opt out via spec.istio.enabled=false.<br/><br/>The default value is `false`. |
Expand Down
183 changes: 183 additions & 0 deletions assets/agw-docs/standalone/llm/arize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
[Arize AX](https://arize.com/docs/ax) is an AI observability platform that accepts OpenTelemetry traces and displays LLM inputs, outputs, models, and token usage. Agentgateway can export directly to Arize AX over OTLP/HTTP or OTLP/gRPC without a separate OpenTelemetry Collector.

## Before you begin

1. [Complete the LLM quickstart]({{< link-hextra path="/documentation/quickstart/llm/" >}}).
2. **Arize account**: Sign up for an [Arize account](https://app.arize.com/auth/join).
3. **Arize API key and Space ID**: Obtain an API key and Space ID from the Arize platform.

## Get your Arize API key and Space ID

1. Log in to the [Arize dashboard](https://app.arize.com/).
2. Go to **Settings** > **API Keys** > **Service Keys**, and click **New Service Key**.
3. For **Account Role**, select **Member**. Add an organization, and then add the spaces that the service key can access.
4. Create the service key and copy the API service key, such as `ak-5245b124-1ef5-5514-...`.
5. Copy the base64 Space ID for the space that receives the traces, such as `U3BhY2U6TbN4WkU6wshdaf==`. The Space ID is different from the space name and organization ID.
6. Set the following environment variables in the environment where agentgateway runs. Do not add the values to your agentgateway configuration file or commit them to source control.
```sh
export ARIZE_API_KEY="<your-api-key>"
export ARIZE_SPACE_ID="<your-space-id>"
```

For OTLP/HTTP, agentgateway sends the API key and Space ID in the `arize-api-key` and `arize-space-id` request headers. For OTLP/gRPC, it sends them as the `api_key` and `space_id` metadata headers.

## Choose an Arize endpoint

Use the collector host for your Arize AX region.

| Region | Collector host |
|--------|----------------|
| US | `otlp.arize.com` |
| US regional | `otlp.us-central-1a.arize.com` |
| EU | `otlp.eu-west-1a.arize.com` |
| Canada | `otlp.ca-central-1a.arize.com` |

Save the collector host for your region in an environment variable. The following examples use the US collector.

```sh
export ARIZE_HOST="otlp.arize.com"
```

## Configure trace export

Update the agentgateway configuration file that you created as part of [Before you begin](#before-you-begin) to add Arize AX as your tracing backend. Choose either OTLP/HTTP or OTLP/gRPC for your protocol, and add the custom tracing attributes that you require. The authentication header names differ by protocol.

{{< tabs >}}
{{% tab name="OTLP/HTTP" %}}

For OTLP/HTTP, use the `arize-api-key` and `arize-space-id` headers.

```yaml
# yaml-language-server: $schema=https://agentgateway.dev/schema/config
frontendPolicies:
tracing:
host: ${ARIZE_HOST}:443
protocol: http
randomSampling: true
clientSampling: true
policies:
backendTLS: {}
requestHeaderModifier:
set:
arize-api-key: ${ARIZE_API_KEY}
arize-space-id: ${ARIZE_SPACE_ID}
resources:
service.name: '"agentgateway"'
openinference.project.name: '"agentgateway"'
attributes:
span.name: '"openai.chat"'
openinference.span.kind: '"LLM"'
llm.system: "llm.provider"
llm.model_name: "coalesce(llm.responseModel, llm.requestModel)"
llm.input_messages: >-
flattenRecursive(llm.prompt.map(c, {"message": c}))
llm.output_messages: >-
flattenRecursive(llm.completion.map(c, {
"role": "assistant",
"content": c
}))
llm.token_count.prompt: "llm.inputTokens"
llm.token_count.completion: "llm.outputTokens"
llm.token_count.total: "llm.totalTokens"
```

{{% /tab %}}
{{% tab name="OTLP/gRPC" %}}

For OTLP/gRPC, use the `api_key` and `space_id` metadata headers.

```yaml
# yaml-language-server: $schema=https://agentgateway.dev/schema/config
frontendPolicies:
tracing:
host: ${ARIZE_HOST}:443
protocol: grpc
randomSampling: true
clientSampling: true
policies:
backendTLS: {}
requestHeaderModifier:
set:
api_key: ${ARIZE_API_KEY}
space_id: ${ARIZE_SPACE_ID}
resources:
service.name: '"agentgateway"'
openinference.project.name: '"agentgateway"'
attributes:
span.name: '"openai.chat"'
openinference.span.kind: '"LLM"'
llm.system: "llm.provider"
llm.model_name: "coalesce(llm.responseModel, llm.requestModel)"
llm.input_messages: >-
flattenRecursive(llm.prompt.map(c, {"message": c}))
llm.output_messages: >-
flattenRecursive(llm.completion.map(c, {
"role": "assistant",
"content": c
}))
llm.token_count.prompt: "llm.inputTokens"
llm.token_count.completion: "llm.outputTokens"
llm.token_count.total: "llm.totalTokens"
```

{{% /tab %}}
{{< /tabs >}}

The values under `resources` and `attributes` are CEL expressions. The extra quotes around static values, such as `'"agentgateway"'`, make the CEL expression evaluate to a string. The authentication headers are regular header values and do not require CEL quoting.

Change `openinference.project.name` if you want traces to appear in a different Arize project. Arize creates the project when it receives the first trace.

## Optional: Add resource attributes

Agentgateway supports custom OpenTelemetry resource attributes through `frontendPolicies.tracing.resources`. Resource attributes are added to every exported span and can help you filter and group traces in Arize AX.

Add attributes such as `model_id`, `model_version`, or `deployment.environment.name` to the `resources` section of your OTLP/HTTP or OTLP/gRPC configuration.

```yaml
frontendPolicies:
tracing:
resources:
service.name: '"agentgateway"'
openinference.project.name: '"agentgateway"'
model_id: '"gpt-4o-production"'
model_version: '"2026-08-27"'
deployment.environment.name: '"production"'
```

Resource values are static CEL expressions that are initialized with the tracer and apply to every request. If agentgateway routes requests to multiple models, use the `llm.model_name` span attribute from the preceding OTLP/HTTP or OTLP/gRPC configuration to record the model for each request instead of setting a single `model_id` resource value.

For more information, see [Add span and resource attributes]({{< link-hextra path="/documentation/observability/traces/setup/#add-attributes" >}}).

## Verify the integration

1. Start agentgateway with the updated configuration.
2. Send an LLM request through agentgateway. The following example assumes that agentgateway runs locally on port `4000` and has an OpenAI-compatible provider and the `gpt-3.5-turbo` model configured.
```sh
curl http://localhost:4000/v1/chat/completions \
-H 'content-type: application/json' \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "Reply with exactly: Arize tracing works"
}
]
}'
```
3. Find the request in the agentgateway logs and copy its `trace.id` value. A successful request resembles the following example.
```text
info request gateway=default/default route=internal/llm:request http.status=200 trace.id=4d50f6d1cb4099a1a22e50b6d339d5f2 span.id=a3f2ae9119406264 protocol=llm gen_ai.provider.name=openai
```
4. In Arize AX, open **Tracing Projects**, select the project that you defined in the `openinference.project.name` field, and search for the trace ID. Trace export is batched, so allow several seconds for the trace to appear.

{{< reuse-image src="img/arize-ax-agentgateway-trace.png" srcDark="img/arize-ax-agentgateway-trace.png" alt="Arize AX showing an agentgateway openai.chat trace with its input, output, latency, cost, and token count" caption="An agentgateway LLM trace in Arize AX." >}}

## Troubleshoot trace export

- Use the header names that correspond to your selected protocol: hyphenated headers for OTLP/HTTP and underscore headers for OTLP/gRPC.
- Confirm that `ARIZE_API_KEY` and `ARIZE_SPACE_ID` are set in the process environment that starts agentgateway.
- Confirm that the collector host matches your Arize region and that `openinference.project.name` is set.
- Set `randomSampling: true` while testing so that agentgateway starts a trace for every request.

For more information about Arize authentication and OpenTelemetry export, see the [Arize AX manual instrumentation documentation](https://arize.com/docs/ax/instrument/manual-instrumentation).
Binary file added assets/img/arize-ax-agentgateway-trace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Arize AX
weight: 5
description: Export agentgateway LLM traces to Arize AX over OTLP/HTTP or OTLP/gRPC.
test: skip
---

{{< reuse "agw-docs/standalone/llm/arize.md" >}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Arize AX
weight: 5
description: Export agentgateway LLM traces to Arize AX over OTLP/HTTP or OTLP/gRPC.
test: skip
---

{{< reuse "agw-docs/standalone/llm/arize.md" >}}
Loading