Skip to content

docs: add Kubernetes Arize AX tracing guide - #988

Open
danehans wants to merge 6 commits into
mainfrom
arize-ax-kubernetes-tracing
Open

docs: add Kubernetes Arize AX tracing guide#988
danehans wants to merge 6 commits into
mainfrom
arize-ax-kubernetes-tracing

Conversation

@danehans

@danehans danehans commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Company

Not applicable; this pull request updates documentation.

Contribution summary

  • Add Kubernetes Arize AX tracing guides under LLM observability.
  • Publish matching guides in the stable and development documentation trees.
  • Document Secret-backed OTLP/HTTP and OTLP/gRPC setup, verification, and troubleshooting.

Checklist

Logo file

  • Not applicable to this documentation change.

Listing

  • Added Arize AX to the Kubernetes LLM observability integrations.

Preview

Both transport configurations were verified end to end on Kind with
agentgateway 1.5.0, and the full Hugo build completed successfully.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploying agentproxy with  Cloudflare Pages  Cloudflare Pages

Latest commit: ac75720
Status: ✅  Deploy successful!
Preview URL: https://354cf635.agentproxy.pages.dev
Branch Preview URL: https://arize-ax-kubernetes-tracing.agentproxy.pages.dev

View logs

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Comment thread content/docs/kubernetes/main/integrations/llm-observability/arize.md Outdated
Comment thread content/docs/kubernetes/main/integrations/llm-observability/arize.md Outdated
Comment on lines +129 to +130
- name: span.name
expression: '"openai.chat"'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTel semconv recommends our default format, which is {method} {path_match}. This would also overwrite other providers, so I'd remove it.

@danehans danehans Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the hardcoded span name from both examples so the semantic convention default is kept across providers.

Comment on lines +131 to +132
- name: openinference.span.kind
expression: '"LLM"'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be other kinds as well.

@danehans danehans Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the hardcoded OpenInference span kind. Arize AX now maps the operation emitted in the native gen_ai attributes.

Comment on lines +133 to +146
- name: llm.system
expression: llm.provider
- name: llm.model_name
expression: coalesce(llm.responseModel, llm.requestModel)
- name: llm.input_messages
expression: 'flattenRecursive(llm.prompt.map(c, {"message": c}))'
- name: llm.output_messages
expression: 'flattenRecursive(llm.completion.map(c, {"role": "assistant", "content": c}))'
- name: llm.token_count.prompt
expression: llm.inputTokens
- name: llm.token_count.completion
expression: llm.outputTokens
- name: llm.token_count.total
expression: llm.totalTokens

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC we already emit these by default.

@danehans danehans Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. Removed the duplicate provider, model, and token aliases and documented that Arize AX natively maps the gen_ai attributes emitted by agentgateway.

Comment on lines +218 to +221
- name: llm.input_messages
expression: 'flattenRecursive(llm.prompt.map(c, {"message": c}))'
- name: llm.output_messages
expression: 'flattenRecursive(llm.completion.map(c, {"role": "assistant", "content": c}))'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call it out that this will ship PII into a vendor SaaS? I'd remove them from the default example and just document how to set it to avoid accidents.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed prompt and response content from the default examples. Added an explicit opt-in section with a warning about PII, credentials, and other sensitive data being sent to a third-party SaaS platform.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
…racing

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
kind: Secret
metadata:
name: arize-credentials
namespace: agentgateway-system

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace: agentgateway-system
namespace: {{< reuse "agw-docs/snippets/namespace.md" >}}

Choose either OTLP/HTTP or OTLP/gRPC. Each option creates the following resources.

- An `AgentgatewayBackend` that connects to Arize AX over TLS and reads the authentication headers from the `arize-credentials` Secret.
- An `AgentgatewayPolicy` that exports sampled LLM traces from the `agentgateway-proxy` Gateway.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- An `AgentgatewayPolicy` that exports sampled LLM traces from the `agentgateway-proxy` Gateway.
- An `{{< reuse "agw-docs/snippets/policy.md" >}}` that exports sampled LLM traces from the `agentgateway-proxy` Gateway.

key: space-id
---
apiVersion: agentgateway.dev/v1alpha1
kind: AgentgatewayPolicy

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kind: AgentgatewayPolicy
kind: {{< reuse "agw-docs/snippets/policy.md" >}}

name: arize-credentials
key: space-id
---
apiVersion: agentgateway.dev/v1alpha1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
apiVersion: agentgateway.dev/v1alpha1
apiVersion: {{< reuse "agw-docs/snippets/api-version.md" >}}

kind: AgentgatewayBackend
metadata:
name: arize-otlp
namespace: agentgateway-system

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace: agentgateway-system
namespace: {{< reuse "agw-docs/snippets/namespace.md" >}}

| EU | `otlp.eu-west-1a.arize.com` |
| Canada | `otlp.ca-central-1a.arize.com` |

The following examples use the US collector. Replace `spec.static.host` with the collector host for your region.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

save this in an env also

namespace: agentgateway-system
spec:
static:
host: otlp.arize.com

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
host: otlp.arize.com
host: ${ARIZE_HOST}

kind: AgentgatewayPolicy
metadata:
name: arize-tracing
namespace: agentgateway-system

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace: agentgateway-system
namespace: {{< reuse "agw-docs/snippets/namespace.md" >}}

kind: AgentgatewayBackend
metadata:
name: arize-otlp
namespace: agentgateway-system

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace: agentgateway-system
namespace: {{< reuse "agw-docs/snippets/namespace.md" >}}

kind: AgentgatewayPolicy
metadata:
name: arize-tracing
namespace: agentgateway-system

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace: agentgateway-system
namespace: {{< reuse "agw-docs/snippets/namespace.md" >}}

key: space-id
---
apiVersion: agentgateway.dev/v1alpha1
kind: AgentgatewayPolicy

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kind: AgentgatewayPolicy
kind: {{< reuse "agw-docs/snippets/policy.md" >}}

name: arize-credentials
key: space-id
---
apiVersion: agentgateway.dev/v1alpha1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
apiVersion: agentgateway.dev/v1alpha1
apiVersion: {{< reuse "agw-docs/snippets/api-version.md" >}}


## Optional: Export LLM inputs and outputs

The default configuration does not export prompt or response content. To display structured input and output messages in Arize AX, add the following attributes to the `AgentgatewayPolicy` for your selected transport.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The default configuration does not export prompt or response content. To display structured input and output messages in Arize AX, add the following attributes to the `AgentgatewayPolicy` for your selected transport.
The default configuration does not export prompt or response content. To display structured input and output messages in Arize AX, add the following attributes to the `{{< reuse "agw-docs/snippets/policy.md" >}}` for your selected transport.


The default configuration does not export prompt or response content. To display structured input and output messages in Arize AX, add the following attributes to the `AgentgatewayPolicy` for your selected transport.

{{< callout type="warning" >}}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{< callout type="warning" >}}

The default configuration does not export prompt or response content. To display structured input and output messages in Arize AX, add the following attributes to the `AgentgatewayPolicy` for your selected transport.

{{< callout type="warning" >}}
LLM prompts and responses can contain personally identifiable information (PII), credentials, or other sensitive data. Enabling these attributes sends that content to a third-party SaaS platform. Review your organization's data-handling requirements and configure appropriate guardrails or redaction before enabling them.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LLM prompts and responses can contain personally identifiable information (PII), credentials, or other sensitive data. Enabling these attributes sends that content to a third-party SaaS platform. Review your organization's data-handling requirements and configure appropriate guardrails or redaction before enabling them.
> [!IMPORTANT]
> LLM prompts and responses can contain personally identifiable information (PII), credentials, or other sensitive data. Enabling these attributes sends that content to a third-party SaaS platform. Review your organization's data-handling requirements and configure appropriate guardrails or redaction before enabling them.


{{< callout type="warning" >}}
LLM prompts and responses can contain personally identifiable information (PII), credentials, or other sensitive data. Enabling these attributes sends that content to a third-party SaaS platform. Review your organization's data-handling requirements and configure appropriate guardrails or redaction before enabling them.
{{< /callout >}}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{< /callout >}}


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

In Kubernetes mode, agentgateway automatically sets `service.name`, `service.version`, `service.instance.id`, and `service.namespace`. The main configuration explicitly sets `deployment.environment.name`. You can add application-specific attributes such as `model_id` or `model_version` to the `resources` list in the `AgentgatewayPolicy` for your selected transport.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the main configuration?


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

In Kubernetes mode, agentgateway automatically sets `service.name`, `service.version`, `service.instance.id`, and `service.namespace`. The main configuration explicitly sets `deployment.environment.name`. You can add application-specific attributes such as `model_id` or `model_version` to the `resources` list in the `AgentgatewayPolicy` for your selected transport.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In Kubernetes mode, agentgateway automatically sets `service.name`, `service.version`, `service.instance.id`, and `service.namespace`. The main configuration explicitly sets `deployment.environment.name`. You can add application-specific attributes such as `model_id` or `model_version` to the `resources` list in the `AgentgatewayPolicy` for your selected transport.
In Kubernetes mode, agentgateway automatically sets `service.name`, `service.version`, `service.instance.id`, and `service.namespace`. The main configuration explicitly sets `deployment.environment.name`. You can add application-specific attributes such as `model_id` or `model_version` to the `resources` list in the `{{< reuse "agw-docs/snippets/policy.md" >}}` for your selected transport.

1. Verify that Kubernetes accepted the backend and attached the policy to the Gateway.
```sh
kubectl get agentgatewaybackend arize-otlp -n agentgateway-system
kubectl get agentgatewaypolicy arize-tracing -n agentgateway-system

@Nadine2016 Nadine2016 Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl get agentgatewaypolicy arize-tracing -n agentgateway-system
kubectl get {{< reuse "agw-docs/snippets/policy.md" >}} arize-tracing -n {{< reuse "agw-docs/snippets/namespace.md" >}}


1. Verify that Kubernetes accepted the backend and attached the policy to the Gateway.
```sh
kubectl get agentgatewaybackend arize-otlp -n agentgateway-system

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl get agentgatewaybackend arize-otlp -n agentgateway-system
kubectl get agentgatewaybackend arize-otlp -n {{< reuse "agw-docs/snippets/namespace.md" >}}


2. If you run a local cluster such as Kind, port-forward the agentgateway proxy.
```sh
kubectl port-forward deployment/agentgateway-proxy -n agentgateway-system 8080:80

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl port-forward deployment/agentgateway-proxy -n agentgateway-system 8080:80
kubectl port-forward deployment/agentgateway-proxy -n {{< reuse "agw-docs/snippets/policy.md" >}} 8080:80

```
4. Find the request in the agentgateway proxy logs and copy its `trace.id` value.
```sh
kubectl logs deployment/agentgateway-proxy -n agentgateway-system \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl logs deployment/agentgateway-proxy -n agentgateway-system \
kubectl logs deployment/agentgateway-proxy -n {{< reuse "agw-docs/snippets/policy.md" >}} \

kubectl logs deployment/agentgateway-proxy -n agentgateway-system \
| grep 'protocol=llm' \
| tail -1
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we provide a sample log entry?

```sh
kubectl port-forward deployment/agentgateway-proxy -n agentgateway-system 8080:80
```
3. In a separate terminal, send an LLM request through agentgateway. The following example assumes that the proxy is available on local port `8080` and has an OpenAI-compatible provider and the `gpt-3.5-turbo` model configured.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we typically have Cloud Provider examples and local test examples in verification steps. https://docs.solo.io/agentgateway/kubernetes/latest/quickstart/non-agentic-http/#step-3-send-a-request-to-the-httpbin-app. I think just the curl command is enough as the before you begin section assumes you have the gateway up and running

## Before you begin

1. [Install agentgateway]({{< link-hextra path="/quickstart/install/" >}}) in your Kubernetes cluster.
2. [Set up an agentgateway proxy]({{< link-hextra path="/setup/gateway/" >}}).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Get the external address of the gateway and save it in an environment variable.
    {{< tabs >}}
    {{% tab name="Cloud Provider LoadBalancer" %}}
    {{< reuse "agw-docs/snippets/kind-loadbalancer-tip.md" >}}

    export INGRESS_GW_ADDRESS=$(kubectl get svc -n {{< reuse "agw-docs/snippets/namespace.md" >}} agentgateway-proxy -o jsonpath="{.status.loadBalancer.ingress[0]['hostname','ip']}")
    echo $INGRESS_GW_ADDRESS  

    {{% /tab %}}
    {{% tab name="Port-forward for local testing" %}}

    kubectl port-forward deployment/agentgateway-proxy -n {{< reuse "agw-docs/snippets/namespace.md" >}} 8080:80

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

| grep 'protocol=llm' \
| tail -1
```
5. In Arize AX, open **Tracing Projects**, select the project from `openinference.project.name`, and search for the trace ID. Trace export is batched, so allow several seconds for the trace to appear.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. In Arize AX, open **Tracing Projects**, select the project from `openinference.project.name`, and search for the trace ID. Trace export is batched, so allow several seconds for the trace to appear.
5. 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.

- Set `randomSampling: "true"` while testing so that agentgateway starts a trace for every request.
- Check the proxy logs for OpenTelemetry exporter errors.
```sh
kubectl logs deployment/agentgateway-proxy -n agentgateway-system \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl logs deployment/agentgateway-proxy -n agentgateway-system \
kubectl logs deployment/agentgateway-proxy -n {{< reuse "agw-docs/snippets/namespace.md" >}} \

@@ -0,0 +1,298 @@
---
title: Arize AX

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move the content under assets/agw-docs/pages and then reference it from here and the page in main with a reuse shortcode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants