Skip to content

Commit 1c377d9

Browse files
committed
initial monitoring instructions
1 parent ce655d8 commit 1c377d9

File tree

6 files changed

+612
-0
lines changed

6 files changed

+612
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [Optional Components](#optional-components)
2121
- [Backup and Restore Guide](#backup-and-restore-guide)
2222
- [Connect an LLM](#connecting-different-llms)
23+
- [Monitoring and Logging](#monitoring-and-logging)
2324
- [Troubleshooting](#troubleshooting)
2425
- [Common Issues](#common-issues)
2526
- [Debug Commands](#debug-commands)
@@ -283,6 +284,10 @@ To backup and restore the data you use RAM for, visit the [Backup and Restore pa
283284

284285
To add different LLMs for RAM to use, visit the [Connecting an LLM page](./docs/llm-connection/README.md).
285286

287+
## Monitoring and Logging
288+
289+
To monitor and log agent and LLM activity, visit the [Monitoring setup page](./docs/monitoring/README.md)
290+
286291
## Troubleshooting
287292

288293
### Common Issues

docs/monitoring/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Monitoring and Logging guide
2+
3+
This folder provides documentation and instructions for managing logs, metrics, and traces using [Vector](https://vector.dev/), [Phoenix](https://phoenix.arize.com/), and [Langfuse](https://langfuse.com/).
4+
5+
## Contents
6+
7+
- [logs-and-metrics.md](./logs-and-metrics.md): Instructions for how to track and view logs and metrics using [Vector](https://vector.dev/).
8+
- [traces.md](./traces.md): Instructions for how to track and view traces using Vector and [Phoenix](https://phoenix.arize.com/) or [Langfuse](https://langfuse.com/).
9+
10+
## Purpose
11+
12+
These documents are intended to help operators and users:
13+
14+
- Deploy Vector and Phoenix in various cloud and on-premises environments
15+
- Configure the endpoints for trace collection using phoenix or langfuse
16+
- Adapt the values files to deploy phoenix on your cluster alongside RAM
17+
18+
Refer to each file for detailed, step-by-step instructions tailored to your platform and use case.

docs/monitoring/logs-and-metrics.md

Whitespace-only changes.

docs/monitoring/traces.md

Whitespace-only changes.

examples/phoenix.yaml

Lines changed: 309 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,309 @@
1+
# Phoenix Helm Chart Values
2+
# This file contains configuration values for deploying Phoenix via Helm.
3+
# Each value corresponds to an environment variable described in https://arize.com/docs/phoenix/self-hosting/configuration.
4+
extraObjects: []
5+
### REQUIRED ###
6+
# -- Ingress TLS secret for RAM HTTPS termination
7+
# -- TLS Certificate for secure external access
8+
# - apiVersion: v1
9+
# kind: Secret
10+
# metadata:
11+
# name: ingress-tls
12+
# namespace: retagentmgr
13+
# data:
14+
# tls.crt: >-
15+
# <base64_encoded_certificate>
16+
# tls.key: >-
17+
# <base64_encoded_private_key>
18+
# type: kubernetes.io/tls
19+
20+
# Replica count
21+
# -- Number of Phoenix pod replicas
22+
replicaCount: 1
23+
24+
# Deployment strategy
25+
deployment:
26+
# -- Deployment strategy
27+
strategy:
28+
type: RollingUpdate
29+
rollingUpdate:
30+
maxUnavailable: "25%"
31+
maxSurge: "25%"
32+
33+
# -- Tolerations, nodeSelector and affinity
34+
# For Pod scheduling strategy on the nodes
35+
tolerations: []
36+
nodeSelector: {}
37+
affinity: {}
38+
39+
postgresql:
40+
# -- Enable PostgreSQL deployment. Set to false if you have your own postgres instance (e.g., RDS, CloudSQL)
41+
# When disabled, you must configure database.url or database.postgres settings to point to your external database
42+
# IMPORTANT: Cannot be enabled simultaneously with persistence.enabled=true (for SQLite)
43+
# Choose one persistence strategy:
44+
# - groundhog2k PostgreSQL: postgresql.enabled=true, persistence.enabled=false
45+
# - SQLite: postgresql.enabled=false, persistence.enabled=true
46+
# - External DB: postgresql.enabled=false, persistence.enabled=false, database.url configured
47+
enabled: false
48+
49+
ingress:
50+
# -- Annotations to add to the ingress resource
51+
annotations: {}
52+
53+
# -- Path prefix for the Phoenix API
54+
apiPath: <desired_phoenix_path>
55+
56+
# -- Enable ingress controller for external access
57+
enabled: true
58+
59+
# -- Hostname for ingress
60+
host: <your_host_name>
61+
62+
# -- Labels to add to the ingress resource
63+
labels: {}
64+
65+
# -- Ingress path type (Prefix, Exact, or ImplementationSpecific)
66+
pathType: "Prefix"
67+
68+
tls:
69+
# -- Enable TLS/HTTPS for ingress
70+
enabled: true
71+
secretName: <ingress_tls_name>
72+
73+
server:
74+
# -- Annotations to add to the Phoenix service
75+
annotations: {}
76+
77+
# -- Enable Prometheus metrics endpoint on port 9090
78+
enablePrometheus: false
79+
80+
# -- Port for OpenTelemetry gRPC collector (PHOENIX_GRPC_PORT)
81+
grpcPort: 4317
82+
83+
# -- Host IP to bind Phoenix server (PHOENIX_HOST)
84+
host: "0.0.0.0"
85+
86+
# -- Root path prefix for Phoenix UI and API (PHOENIX_HOST_ROOT_PATH)
87+
hostRootPath: ""
88+
89+
# -- Labels to add to the Phoenix service
90+
labels: {}
91+
92+
# -- Port for Phoenix web UI and HTTP API (PHOENIX_PORT)
93+
port: 6006
94+
95+
rootUrl: <your_host_name>
96+
97+
# -- The working directory for saving, loading, and exporting data (PHOENIX_WORKING_DIR)
98+
# Set to empty string to use container's $HOME directory (not recommended for persistence)
99+
# Use `/data` as a default for volume mount - enables proper permissions in both strict and normal security contexts
100+
# IMPORTANT: When persistence.enabled=true, this directory must be writable by the Phoenix container (UID 65532)
101+
# The fsGroup setting in securityContext.pod ensures proper permissions when enabled
102+
workingDir: "/data"
103+
104+
# -- Allows calls to external resources, like Google Fonts in the web interface (PHOENIX_ALLOW_EXTERNAL_RESOURCES)
105+
# Set to false in air-gapped environments to prevent external requests that can cause UI loading delays
106+
allowExternalResources: true
107+
108+
# Service configuration
109+
service:
110+
# -- Service type for Phoenix service (ClusterIP, NodePort, LoadBalancer, or ExternalName)
111+
# Use ClusterIP for service mesh deployments (Istio, Linkerd, etc.)
112+
# Use NodePort for direct external access without ingress
113+
type: "ClusterIP"
114+
115+
# -- Annotations to add to the Phoenix service (useful for service mesh configurations)
116+
annotations:
117+
{}
118+
# For Istio service mesh, you might want:
119+
# service.istio.io/canonical-name: phoenix
120+
# service.istio.io/canonical-revision: stable
121+
122+
# -- Labels to add to the Phoenix service
123+
labels:
124+
{}
125+
# For service mesh deployments, you might want:
126+
# app: phoenix
127+
# version: stable
128+
129+
# Persistence configuration for Phoenix home directory
130+
persistence:
131+
enabled: false
132+
133+
134+
database:
135+
# -- Storage allocation in GiB for the database persistent volume
136+
allocatedStorageGiB: 20
137+
138+
# -- Default retention policy for traces in days (PHOENIX_DEFAULT_RETENTION_POLICY_DAYS)
139+
# Set to 0 to disable automatic trace cleanup. When set to a positive value,
140+
# traces older than this many days will be automatically removed from the database.
141+
defaultRetentionPolicyDays: 0
142+
143+
postgres:
144+
# -- Name of the PostgreSQL database (PHOENIX_POSTGRES_DB)
145+
db: "SASRetrievalAgentManagerMonitoring"
146+
147+
# -- Postgres Host (PHOENIX_POSTGRES_HOST)
148+
# Default points to the groundhog2k PostgreSQL service when postgresql.enabled=true
149+
# IMPORTANT: Only change this when using external PostgreSQL (postgresql.enabled=false, database.url empty)
150+
# Examples: "localhost", "postgres.example.com", "your-rds-endpoint.region.rds.amazonaws.com"
151+
host: <your_db_name>
152+
153+
# -- PostgreSQL password (should match auth.secret."PHOENIX_POSTGRES_PASSWORD", PHOENIX_POSTGRES_PASSWORD)
154+
password: <your_db_password>
155+
156+
# -- Port number for PostgreSQL connections (PHOENIX_POSTGRES_PORT)
157+
port: 5432
158+
159+
# -- PostgreSQL schema to use (PHOENIX_SQL_DATABASE_SCHEMA)
160+
schema: "phoenix"
161+
162+
# -- PostgreSQL username (PHOENIX_POSTGRES_USER)
163+
user: <your_db_username>
164+
165+
# -- Full database connection URL (overrides postgres settings if provided)
166+
# IMPORTANT: Only set this for external databases (Strategy 3)
167+
# - When using SQLite (Strategy 1): MUST be empty - SQLite auto-uses persistent volume
168+
# - When using built-in PostgreSQL (Strategy 2): MUST be empty - auto-configured
169+
# - When using external database (Strategy 3): MUST be configured with full connection string
170+
#
171+
# Examples for external databases:
172+
# PostgreSQL: "postgresql://username:[email protected]:5432/phoenix"
173+
# SQLite: "sqlite:///path/to/database.db" (only for external SQLite files, not recommended)
174+
#
175+
# WARNING: Setting this will override all database.postgres.* settings and disable built-in PostgreSQL validation
176+
# url: ""
177+
178+
# Authentication and security
179+
auth:
180+
# -- Duration in minutes before access tokens expire and require renewal (PHOENIX_ACCESS_TOKEN_EXPIRY_MINUTES)
181+
accessTokenExpiryMinutes: 60
182+
183+
# FIX: Add your domain to CORS/CSRF
184+
allowedOrigins:
185+
- <your_host_name>
186+
- "http://localhost:6006"
187+
188+
csrfTrustedOrigins:
189+
- <your_host_name>
190+
- "http://localhost:6006"
191+
192+
defaultAdminPassword: "iotorion123!"
193+
194+
enableAuth: false
195+
196+
# -- Name of the Kubernetes secret containing authentication credentials
197+
name: "phoenix-secret"
198+
199+
# -- Duration in minutes before password reset tokens expire (PHOENIX_PASSWORD_RESET_TOKEN_EXPIRY_MINUTES)
200+
passwordResetTokenExpiryMinutes: 60
201+
202+
# -- Duration in minutes before refresh tokens expire (PHOENIX_REFRESH_TOKEN_EXPIRY_MINUTES)
203+
refreshTokenExpiryMinutes: 43200
204+
205+
secret:
206+
# -- Environment variable name for the main Phoenix secret key used for encryption
207+
- key: "PHOENIX_SECRET"
208+
# -- Autogenerated if empty
209+
value: ""
210+
# -- Use this for existing Secrets / Configmaps, takes precedence over auth.secret[].value
211+
# valueFrom:
212+
# secretKeyRef:
213+
# name: my-secret
214+
# key: phoenix-secret-key
215+
216+
# -- Environment variable name for the admin secret key
217+
- key: "PHOENIX_ADMIN_SECRET"
218+
# -- Autogenerated if empty
219+
value: ""
220+
221+
# -- Environment variable name for the PostgreSQL password
222+
- key: "PHOENIX_POSTGRES_PASSWORD"
223+
# -- If using postgres in this chart, password must match with database.postgres.password
224+
value: "iotorion123!"
225+
226+
# -- Environment variable name for the SMTP password
227+
- key: "PHOENIX_SMTP_PASSWORD"
228+
# -- Autogenerated if empty
229+
value: ""
230+
231+
# -- Environment variable name for the default admin password
232+
- key: "PHOENIX_DEFAULT_ADMIN_INITIAL_PASSWORD"
233+
# -- Default password for the admin user on initial setup, uses defaultAdminPassword if empty
234+
value: <default_phoenix_password>
235+
236+
# -- Enable secure cookies (should be true when using HTTPS)
237+
useSecureCookies: false
238+
239+
# OAuth2/OIDC Identity Provider Configuration
240+
# Configure OAuth2 identity providers for authentication
241+
oauth2:
242+
# -- Enable OAuth2/OIDC authentication
243+
enabled: false
244+
245+
# -- List of OAuth2 identity providers to configure
246+
# Each provider requires client_id, client_secret, and oidc_config_url
247+
# Optional settings include display_name, allow_sign_up, and auto_login
248+
# You can also define corresponding ENVs via auth.secrets[].valueFrom to use existing secrets
249+
# ENVs: PHOENIX_OAUTH2_{{ $provider_upper }}_{{ setting }}, e.g. PHOENIX_OAUTH2_GOOGLE_CLIENT_SECRET
250+
providers:
251+
# Example Google configuration:
252+
# google:
253+
# client_id: "your-google-client-id"
254+
# client_secret: "your-google-client-secret"
255+
# oidc_config_url: "https://accounts.google.com/.well-known/openid-configuration"
256+
# display_name: "Google" # Optional, defaults to provider name
257+
# allow_sign_up: true # Optional, defaults to true
258+
# auto_login: false # Optional, defaults to false
259+
260+
# Example AWS Cognito configuration:
261+
# aws_cognito:
262+
# client_id: "your-aws-cognito-client-id"
263+
# client_secret: "your-aws-cognito-client-secret"
264+
# oidc_config_url: "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_xxxxx/.well-known/openid-configuration"
265+
# display_name: "AWS Cognito"
266+
# allow_sign_up: true
267+
# auto_login: false
268+
269+
# Example Microsoft Entra ID configuration:
270+
# microsoft_entra_id:
271+
# client_id: "your-microsoft-entra-id-client-id"
272+
# client_secret: "your-microsoft-entra-id-client-secret"
273+
# oidc_config_url: "https://login.microsoftonline.com/your-tenant-id/v2.0/.well-known/openid-configuration"
274+
# display_name: "Microsoft Entra ID"
275+
# allow_sign_up: true
276+
# auto_login: false
277+
278+
# Example Keycloak configuration:
279+
# keycloak:
280+
# client_id: "phoenix"
281+
# client_secret: "your-keycloak-client-secret"
282+
# oidc_config_url: "https://your-keycloak-server/realms/your-realm/.well-known/openid-configuration"
283+
# display_name: "Keycloak"
284+
# allow_sign_up: true
285+
# auto_login: false
286+
287+
288+
# Logging
289+
logging:
290+
# -- Database logging level (debug, info, warning, error) PHOENIX_DB_LOGGING_LEVEL
291+
dbLevel: "warning"
292+
293+
# -- Application logging level (debug, info, warning, error) PHOENIX_LOGGING_LEVEL
294+
level: "info"
295+
296+
# -- Enable logging of database migration operations (PHOENIX_LOG_MIGRATIONS)
297+
logMigrations: true
298+
299+
# -- Logging mode configuration - PHOENIX_LOGGING_MODE (default|structured)
300+
mode: "default"
301+
302+
# Instrumentation
303+
instrumentation:
304+
# -- OpenTelemetry collector gRPC endpoint for sending traces (PHOENIX_SERVER_INSTRUMENTATION_OTLP_TRACE_COLLECTOR_GRPC_ENDPOINT)
305+
otlpTraceCollectorGrpcEndpoint: ""
306+
307+
# -- OpenTelemetry collector HTTP endpoint for sending traces (PHOENIX_SERVER_INSTRUMENTATION_OTLP_TRACE_COLLECTOR_HTTP_ENDPOINT)
308+
otlpTraceCollectorHttpEndpoint: ""
309+

0 commit comments

Comments
 (0)