The Wharf service is an OTLP (OpenTelemetry Protocol) trace collector that receives, processes, and stores distributed tracing data from the CrewAI Platform. It provides observability into application performance and helps diagnose issues in distributed workflows.Documentation Index
Fetch the complete documentation index at: https://enterprise-docs.crewai.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Wharf operates as a separate microservice with its own database for storing trace data. When enabled, it automatically:- Receives OTLP trace data from the CrewAI Platform components
- Stores traces in a dedicated PostgreSQL database
- Provides a health check endpoint for monitoring
- Exposes Prometheus metrics for observability
- Configures automatic trace data retention
Prerequisites
Wharf is enabled by default in the chart. Before installing or upgrading, ensure the following requirements are met:- Wharf database: When using external PostgreSQL (
postgres.enabled: false), the Wharf database must exist before installation. See Database Management below. - CrewAI version: Trace collection requires CrewAI >= 1.12. Versions >= 1.13 include the best support, with token usage and inputs captured in spans.
wharf.enabled: false in your values.
Database Management
With internal PostgreSQL (postgres.enabled: true):
The Helm chart automatically handles database initialization:
- Auto-Creation: The Wharf database is created automatically during initial chart installation
- Migrations: Database schema migrations run automatically during installation and upgrades
- Database Readiness: Wharf waits for PostgreSQL to become available before proceeding
- Isolation: Wharf uses a separate database from the main application for trace data isolation
postgres.enabled: false):
When using a managed database service (AWS RDS, Google Cloud SQL, Azure Database), you must manually create the Wharf database before installing the chart. The database name should match postgres.wharfDatabase (default: wharf). If the database is missing, the migration will fail during installation or upgrade.
Planning for external PostgreSQL
- Never use the application database: The primary Rails database (for example, a database named like
crewai_plus_production) is only for the CrewAI Platform application. Wharf must use a different logical database. Do not point Wharf at the Rails database. - Typical layout: Most teams reuse the same managed PostgreSQL instance they already use for the platform (for example, RDS, Aurora, Azure Database for PostgreSQL, Cloud SQL, or self-managed PostgreSQL) and add one additional empty database for traces—not a second server by default.
- Naming: A descriptive name such as
crewai_wharfhelps operators see that the database is for trace storage. The chart default forpostgres.wharfDatabaseiswharf. Whatever name you create in PostgreSQL,postgres.wharfDatabasein your values must match it. - Separate PostgreSQL instance: Use a dedicated database server (not only a separate database name) when you need stronger isolation, independent backup and restore windows, or you expect very high trace volume and want to avoid load on the application database. That is optional and usually driven by governance or scale.
- Network: When Wharf is enabled, the cluster needs the same kind of reachability to PostgreSQL as for the app (host, port, typically
5432), including firewalls and security groups, for the Wharf logical database.
Cloud SQL Auth Proxy Support (GCP)
When using Google Cloud SQL with Workload Identity, Wharf supports the Cloud SQL Auth Proxy sidecar:- Enabled: When
cloudSqlProxy.enabled: true, a sidecar container is automatically added to Wharf pods - Purpose: Provides secure, encrypted connections to Cloud SQL instances using IAM authentication
- Configuration: Uses the same
cloudSqlProxyconfiguration as other services (web, worker, OAuth, job)
Configuration
Enable or disable the Wharf OTLP trace collector service.Values:
true- Deploy Wharf trace collector (default)false- Disable trace collection
- Wharf Deployment with configurable replicas
- ClusterIP Service for OTLP trace ingestion
- Dedicated PostgreSQL database for trace storage
- Auto-injected environment variables for Rails integration
Image Configuration
Container registry hosting the Wharf image.Default:
"" (empty) - Automatically uses global.imageRegistry valueFallback Behavior:When wharf.image.host is empty or not set, the chart uses global.imageRegistry. This allows you to configure the registry once at the global level.Example:Wharf container image name.Default:
"proxy/crewai/crewai/wharf" - Matches Replicated proxy path structurePath Transformation:When global.imageNamePrefixOverride is set, only the final component (wharf) is used with the override prefix.Wharf service version to deploy.Default:
"0.1.2"Upgrade Consideration: Wharf handles database migrations automatically when the version changes.Image pull policy for Wharf container.Valid Values:
"IfNotPresent"- Pull only if image is not present locally"Always"- Always pull image on pod start"Never"- Never pull, use local image only
Image pull secret for Wharf image. If empty, uses the global
image.pullSecret.Default Behavior: Inherits from image.pullSecret for consistencyService Configuration
Number of Wharf service replicas to deploy.Scaling Considerations:
- Single replica is sufficient for most deployments
- Multiple replicas can be used for high availability
- Wharf is stateless and can scale horizontally
1HTTP port for OTLP trace ingestion and health checks.Default:
8080Purpose: Receives OTLP traces and serves health check endpoint at /healthPrometheus metrics endpoint port.Default:
9090Purpose: Exposes service metrics in Prometheus format at /metricsAnnotations: The Deployment automatically includes Prometheus scrape annotations:Storage and Processing
Backend storage type for trace data.Default:
"postgres"Supported Values:"postgres"- PostgreSQL database storage (recommended)
envVars.DB_USER and secrets.DB_PASSWORDTrace processing sink type.Default:
"memory_batch"Purpose: Controls how traces are buffered and written to storageSupported Values:"memory_batch"- Batch traces in memory before writing (better performance)
Trace data retention period in weeks.Default:
"13" (approximately 3 months)Purpose: Automatically removes trace data older than the specified period to manage storageRecommendations:- Development:
"4"(1 month) - Production:
"13"(3 months) or longer based on compliance requirements - High-volume: Reduce retention to manage database size
"13", "26", "52")Resource Allocation
CPU limit for Wharf pod.Default:
"500m" (0.5 CPU cores)Sizing Guidelines:- Light tracing:
"500m" - Moderate tracing:
"1" - Heavy tracing:
"2"or higher
Memory limit for Wharf pod.Default:
"512Mi"Sizing Guidelines:- Light tracing:
"512Mi" - Moderate tracing:
"1Gi" - Heavy tracing:
"2Gi"or higher
CPU request for Wharf pod.Default:
"100m" (0.1 CPU cores)Purpose: Guaranteed CPU allocation for schedulingMemory request for Wharf pod.Default:
"128Mi"Purpose: Guaranteed memory allocation for schedulingNode Placement
Node selector labels for Wharf pod placement.Default: Use Cases:
{} (no node restrictions)Example:- Isolate observability workloads on dedicated nodes
- Co-locate with other monitoring services
- Comply with data residency requirements
Integration with CrewAI Platform
When Wharf is enabled, the following environment variables are automatically injected into the Rails application and worker pods:WHARF_URL- Internal Kubernetes service URL for trace submissionWHARF_JWT_SECRET- Shared secret for authenticating trace submissions
Security
Wharf runs with security-hardened settings:- Non-root execution: Runs as user ID 1000
- Read-only root filesystem: Prevents runtime modifications
- Dropped capabilities: All Linux capabilities removed
- No privilege escalation:
allowPrivilegeEscalation: false
Monitoring
Health Checks:- Startup Probe:
GET /health- Initial availability check (max 5 minutes) - Liveness Probe:
GET /health- Service health monitoring (every 10 seconds) - Readiness Probe:
GET /health- Traffic routing readiness (every 5 seconds)
- Endpoint:
http://wharf-pod:9090/metrics - Format: Prometheus exposition format
- Auto-Discovery: Prometheus scrape annotations included
Example Configurations
Minimal Configuration (Default)
Wharf is enabled by default; no values are required to deploy it with default settings. The configuration below is shown for completeness:Custom Resource Limits
Extended Retention with High Availability
Disabled (Opt-Out)
Setwharf.enabled: false to override the default and skip deploying the trace collector:
