Skip to content
Merged
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
5 changes: 5 additions & 0 deletions helm-charts/bifrost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Official Helm charts for deploying [Bifrost](https://github.com/maximhq/bifrost)

## Changelog

### Upcoming

- Added `traces_enabled` to OTEL config (single-profile and `profiles[*]`). When `false`, no traces are exported and `collector_url` is not required, giving a metrics-only profile. Renders into `traces_enabled`; defaults to `true`.
- Added `trace_headers` and `metrics_headers` to OTEL config (single-profile and `profiles[*]`). Common `headers` still go to both endpoints; these are overlaid on top for the trace / metrics endpoint respectively (same key wins), e.g. a Databricks table name required only on metrics. Render into `trace_headers` / `metrics_headers`.

### 2.1.33

- Fixed Helm schema validation failure for multi-profile OTEL configs (`bifrost.plugins.otel.config.profiles`), introduced by the `export_timeout` default in 2.1.32.
Expand Down
35 changes: 28 additions & 7 deletions helm-charts/bifrost/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,9 @@ false
{{- if $inputConfig.service_name }}
{{- $_ := set $otelConfig "service_name" $inputConfig.service_name }}
{{- end }}
{{- if hasKey $inputConfig "traces_enabled" }}
{{- $_ := set $otelConfig "traces_enabled" $inputConfig.traces_enabled }}
{{- end }}
{{- if $inputConfig.collector_url }}
{{- $_ := set $otelConfig "collector_url" $inputConfig.collector_url }}
{{- end }}
Expand All @@ -1396,6 +1399,12 @@ false
{{- if $inputConfig.headers }}
{{- $_ := set $otelConfig "headers" $inputConfig.headers }}
{{- end }}
{{- if $inputConfig.trace_headers }}
{{- $_ := set $otelConfig "trace_headers" $inputConfig.trace_headers }}
{{- end }}
{{- if $inputConfig.metrics_headers }}
{{- $_ := set $otelConfig "metrics_headers" $inputConfig.metrics_headers }}
{{- end }}
{{- if $inputConfig.tls_ca_cert }}
{{- $_ := set $otelConfig "tls_ca_cert" $inputConfig.tls_ca_cert }}
{{- end }}
Expand Down Expand Up @@ -1892,13 +1901,19 @@ Call this template at the beginning of deployment/stateful templates
{{- $profileEnabled = $profile.enabled }}
{{- end }}
{{- if $profileEnabled }}
{{- $tracesEnabled := true }}
{{- if hasKey $profile "traces_enabled" }}
{{- $tracesEnabled = $profile.traces_enabled }}
{{- end }}
{{- if $tracesEnabled }}
{{- if not $profile.collector_url }}
{{- fail (printf "ERROR: bifrost.plugins.otel.config.profiles[%d].collector_url is required for enabled OTEL profiles." $idx) }}
{{- fail (printf "ERROR: bifrost.plugins.otel.config.profiles[%d].collector_url is required when traces_enabled is true." $idx) }}
{{- end }}
{{- if not $profile.trace_type }}
{{- fail (printf "ERROR: bifrost.plugins.otel.config.profiles[%d].trace_type is required. Supported values: genai_extension, vercel, open_inference" $idx) }}
{{- fail (printf "ERROR: bifrost.plugins.otel.config.profiles[%d].trace_type is required when traces_enabled is true. Supported values: genai_extension, vercel, open_inference" $idx) }}
{{- end }}
{{- if not $profile.protocol }}
{{- end }}
{{- if and (or $tracesEnabled $profile.metrics_enabled) (not $profile.protocol) }}
{{- fail (printf "ERROR: bifrost.plugins.otel.config.profiles[%d].protocol is required. Supported values: http, grpc" $idx) }}
{{- end }}
{{- if and $profile.metrics_enabled (not $profile.metrics_endpoint) }}
Expand All @@ -1907,14 +1922,20 @@ Call this template at the beginning of deployment/stateful templates
{{- end }}
{{- end }}
{{- else }}
{{- $tracesEnabled := true }}
{{- if hasKey $otelInputConfig "traces_enabled" }}
{{- $tracesEnabled = $otelInputConfig.traces_enabled }}
{{- end }}
{{- if $tracesEnabled }}
{{- if not $otelInputConfig.collector_url }}
{{- fail "ERROR: bifrost.plugins.otel.config.collector_url is required when OTEL plugin is enabled. Provide the URL of your OpenTelemetry collector." }}
{{- fail "ERROR: bifrost.plugins.otel.config.collector_url is required when traces_enabled is true. Provide the URL of your OpenTelemetry collector." }}
{{- end }}
{{- if not $otelInputConfig.trace_type }}
{{- fail "ERROR: bifrost.plugins.otel.config.trace_type is required when OTEL plugin is enabled. Supported values: genai_extension, vercel, open_inference" }}
{{- fail "ERROR: bifrost.plugins.otel.config.trace_type is required when traces_enabled is true. Supported values: genai_extension, vercel, open_inference" }}
{{- end }}
{{- end }}
{{- if not $otelInputConfig.protocol }}
{{- fail "ERROR: bifrost.plugins.otel.config.protocol is required when OTEL plugin is enabled. Supported values: http, grpc" }}
{{- if and (or $tracesEnabled $otelInputConfig.metrics_enabled) (not $otelInputConfig.protocol) }}
{{- fail "ERROR: bifrost.plugins.otel.config.protocol is required. Supported values: http, grpc" }}
{{- end }}
{{- if and $otelInputConfig.metrics_enabled (not $otelInputConfig.metrics_endpoint) }}
{{- fail "ERROR: bifrost.plugins.otel.config.metrics_endpoint is required when metrics_enabled is true." }}
Expand Down
84 changes: 67 additions & 17 deletions helm-charts/bifrost/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1059,11 +1059,12 @@
"type": "object",
"properties": {
"service_name": {
"type": "string"
"type": "string",
"description": "Name of the service to report to Datadog. Supports env.VAR_NAME prefix for environment variable substitution (e.g. env.BIFROST_DD_SERVICE)"
},
"ml_app": {
"type": "string",
"description": "ML application name for Datadog LLM Observability grouping (defaults to service_name)"
"description": "ML application name for Datadog LLM Observability grouping (defaults to service_name). Supports env.VAR_NAME prefix for environment variable substitution (e.g. env.BIFROST_DD_ML_APP)"
},
"agent_addr": {
"type": "string",
Expand All @@ -1090,10 +1091,12 @@
"description": "DogStatsD server port for metrics, used with dogstatsd_host (agent mode only). Supports env.VAR_NAME prefix. Defaults to 8125; has no effect when dogstatsd_host is unset"
},
"env": {
"type": "string"
"type": "string",
"description": "Environment tag (e.g. production, staging). Supports env.VAR_NAME prefix for environment variable substitution (e.g. env.BIFROST_DD_ENV)"
},
"version": {
"type": "string"
"type": "string",
"description": "Service version tag. Supports env.VAR_NAME prefix for environment variable substitution (e.g. env.BIFROST_DD_VERSION)"
},
"custom_tags": {
"type": "object",
Expand Down Expand Up @@ -4897,6 +4900,11 @@
"description": "Whether this profile exports traces and metrics",
"default": true
},
"traces_enabled": {
"type": "boolean",
"description": "Enable trace export for this profile. When false, no traces are sent and collector_url is not required, giving a metrics-only profile (pair with metrics_enabled).",
"default": true
},
"service_name": {
"type": "string",
"description": "Service name to be used for tracing",
Expand Down Expand Up @@ -4944,7 +4952,21 @@
"additionalProperties": {
"type": "string"
},
"description": "Custom headers for the collector (supports env.VAR_NAME prefix)"
"description": "Custom headers sent to both the trace and metrics endpoints (supports env.VAR_NAME prefix)"
},
"trace_headers": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Extra headers sent only to the trace endpoint, overlaid on headers (same key wins). Supports env.VAR_NAME prefix."
},
"metrics_headers": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Extra headers sent only to the metrics endpoint, overlaid on headers (same key wins). Useful when a collector requires a per-signal header, e.g. a Databricks table name. Supports env.VAR_NAME prefix."
},
"tls_ca_cert": {
"type": "string",
Expand Down Expand Up @@ -4984,30 +5006,58 @@
"allOf": [
{
"if": {
"not": {
"properties": {
"enabled": {
"const": false
"allOf": [
{
"not": {
"properties": {
"enabled": {
"const": false
}
},
"required": ["enabled"]
}
},
"required": ["enabled"]
}
{
"not": {
"properties": {
"traces_enabled": {
"const": false
}
},
"required": ["traces_enabled"]
}
}
]
},
"then": {
"required": ["collector_url", "trace_type", "protocol"]
}
},
{
"if": {
"properties": {
"metrics_enabled": {
"const": true
"allOf": [
{
"not": {
"properties": {
"enabled": {
"const": false
}
},
"required": ["enabled"]
}
},
{
"properties": {
"metrics_enabled": {
"const": true
}
},
"required": ["metrics_enabled"]
}
},
"required": ["metrics_enabled"]
]
},
"then": {
"required": ["metrics_endpoint"]
"required": ["metrics_endpoint", "protocol"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
}
],
Expand Down
21 changes: 15 additions & 6 deletions helm-charts/bifrost/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -612,14 +612,17 @@ bifrost:
# Multi-profile shape (use profiles OR the flat single-profile fields below, not both):
# profiles:
# - service_name: "bifrost"
# traces_enabled: true # Set false for a metrics-only profile (collector_url not required)
# collector_url: "" # e.g., http://otel-collector:4318 (HTTP) or otel-collector:4317 (gRPC)
# trace_type: "genai_extension" # genai_extension | vercel | open_inference
# protocol: "grpc" # http | grpc
# export_timeout: 5 # Max seconds for one trace export (1-60); the only timeout on gRPC exports
# metrics_enabled: false
# metrics_endpoint: "" # e.g., http://otel-collector:4318/v1/metrics (HTTP) or otel-collector:4317 (gRPC)
# metrics_push_interval: 15 # Push interval in seconds (1-300)
# headers: {}
# headers: {} # Sent to both endpoints (supports env.VAR_NAME prefix)
# trace_headers: {} # Sent only to the trace endpoint, on top of headers (same key overrides)
# metrics_headers: {} # Sent only to the metrics endpoint, on top of headers (e.g. a Databricks table name)
# tls_ca_cert: "" # Path to TLS CA certificate file
# insecure: true # Skip TLS verification (ignored if tls_ca_cert is set)
# disable_content_logging: false
Expand All @@ -629,6 +632,8 @@ bifrost:
#
# Single-profile shape:
service_name: "bifrost"
# Set false for a metrics-only profile (collector_url not required)
# traces_enabled: true
collector_url: "" # e.g., http://otel-collector:4318 (HTTP) or otel-collector:4317 (gRPC)
trace_type: "genai_extension" # genai_extension | vercel | open_inference
protocol: "grpc" # http | grpc
Expand All @@ -640,8 +645,12 @@ bifrost:
metrics_enabled: false
metrics_endpoint: "" # e.g., http://otel-collector:4318/v1/metrics (HTTP) or otel-collector:4317 (gRPC)
metrics_push_interval: 15 # Push interval in seconds (1-300)
# Custom headers for the collector (supports env.VAR_NAME prefix)
# Custom headers sent to both the trace and metrics endpoints (supports env.VAR_NAME prefix)
headers: {}
# Extra headers sent only to the trace endpoint, on top of headers (same key overrides)
# trace_headers: {}
# Extra headers sent only to the metrics endpoint, on top of headers (e.g. a Databricks table name)
# metrics_headers: {}
# TLS configuration
tls_ca_cert: "" # Path to TLS CA certificate file
# insecure: false # Skip TLS verification (ignored if tls_ca_cert is set)
Expand All @@ -658,7 +667,7 @@ bifrost:
enabled: false
version: 1
config:
service_name: "bifrost"
service_name: "bifrost" # Service name reported to Datadog (supports env.VAR_NAME)
# Datadog Agent address. Supports env.VAR_NAME references — e.g. set
# agent_addr: "env.DD_AGENT_ADDR" and inject DD_AGENT_ADDR via the
# top-level `env:` (e.g. from status.hostIP for a node-local agent DaemonSet).
Expand All @@ -672,11 +681,11 @@ bifrost:
# agent_port: "8126"
# dogstatsd_host: "env.DD_AGENT_HOST"
# dogstatsd_port: "8125"
env: ""
version: ""
env: "" # Environment tag, e.g. production (supports env.VAR_NAME)
version: "" # Service version tag (supports env.VAR_NAME)
custom_tags: {}
enable_traces: true
# ml_app: "" # ML app name for LLM Observability (defaults to service_name)
# ml_app: "" # ML app name for LLM Observability (defaults to service_name, supports env.VAR_NAME)
# enable_metrics: true
# enable_llm_obs: true
# group_traces_by_session: false # Group requests sharing x-bf-session-id into one APM trace (agent mode only)
Expand Down
Loading
Loading