Skip to content

feat: add support for DD env vars with helm & doc changes - #4269

Merged
Pratham-Mishra04 merged 1 commit into
devfrom
06-11-feat_add_support_for_dd_env_vars_with_helm_doc_changes
Jun 11, 2026
Merged

Pratham-Mishra04 merged 1 commit into
devfrom
06-11-feat_add_support_for_dd_env_vars_with_helm_doc_changes

Conversation

@roroghost17

@roroghost17 roroghost17 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Expands the Datadog connector's Helm chart and documentation to expose the full set of connector configuration fields, and adds environment variable substitution support for agent_addr and dogstatsd_addr.

Changes

  • agent_addr and dogstatsd_addr now accept EnvVar values (e.g. env.DD_AGENT_ADDR, env.DD_DOGSTATSD_ADDR), enabling dynamic address resolution at runtime — useful for injecting a node-local Datadog agent's address via status.hostIP in Kubernetes.
  • Added ml_app, dogstatsd_addr, enable_metrics, enable_llm_obs, disable_content_logging, agentless, api_key, site, and request_headers to the Helm chart's _helpers.tpl, values.schema.json, and values.yaml so all connector options are configurable via Helm.
  • Added a version field to the connector schema at the top level.
  • Updated values.yaml with inline comments documenting agentless mode, env var substitution, and optional fields.
  • Updated documentation to reflect that agent_addr and dogstatsd_addr support env.VAR_NAME substitution, and added corresponding examples to the environment variable substitution section.

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

Deploy Bifrost via Helm with the Datadog connector configured using env.VAR_NAME references for agent_addr and dogstatsd_addr, and verify the connector resolves the addresses from the injected environment variables at runtime.

helm upgrade --install bifrost ./helm-charts/bifrost \
  --set bifrost.connectors.datadog.enabled=true \
  --set bifrost.connectors.datadog.config.agent_addr="env.DD_AGENT_ADDR" \
  --set bifrost.connectors.datadog.config.dogstatsd_addr="env.DD_DOGSTATSD_ADDR"

Confirm that previously unsupported fields (ml_app, enable_metrics, enable_llm_obs, agentless, api_key, site, request_headers) are correctly rendered into the generated config.

Breaking changes

  • Yes
  • No

Related issues

Security considerations

api_key supports env.VAR_NAME substitution, ensuring Datadog API keys are not hardcoded in Helm values and can be injected securely via Kubernetes secrets or environment variables.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

Summary by CodeRabbit

  • Documentation

    • Clarified env.VAR_NAME substitution for Datadog config fields with updated examples; updated metrics reference for renamed metric and type change with migration guidance; added new automatic tag (bifrost_node).
  • New Features

    • Added expanded Datadog configuration options: ML/LLM observability toggles, metrics enablement, agentless/API settings, DogStatsD address, request header support, and app identification; Helm charts now validate required API key when agentless is enabled.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Extends Datadog plugin surface across schema, Helm templates, CI validation, and docs: adds ml_app, dogstatsd_addr, toggles and agentless/api configuration, documents env.VAR substitution for multiple fields, and renames the cost metric to bifrost.request.cost.usd (Distribution) with migration guidance.

Changes

Datadog Configuration Expansion

Layer / File(s) Summary
Datadog config schema expansion
helm-charts/bifrost/values.schema.json, transports/config.schema.json
Schema reworked to add version as integer, introduce identification fields (ml_app, dogstatsd_addr), expand config properties with toggles (enable_metrics, enable_traces, enable_llm_obs, disable_content_logging, agentless) and credential/endpoint/header settings (api_key, site, request_headers), and updated agent_addr/custom_tags descriptions to allow env. values; added conditional requiring api_key when agentless is true.
Helm template for expanded config
helm-charts/bifrost/templates/_helpers.tpl
Template logic updated to conditionally populate the new Datadog config fields (ml_app, dogstatsd_addr, enable_metrics, enable_llm_obs, disable_content_logging, agentless, api_key, site, request_headers) alongside existing keys like agent_addr and enable_traces, and added a validation failure when agentless is true without api_key.
Helm config validation tests
.github/workflows/scripts/validate-helm-config-fields.sh
Validation script extended to include the new Datadog fields in generated values-plugins.yaml and assert their presence/structure in the rendered config.json, including request_headers.
Values and documentation
helm-charts/bifrost/values.yaml, docs/enterprise/datadog-connector.mdx
Values comments and docs updated to document env.VAR_NAME usage for agent_addr/dogstatsd_addr and env-prefixed substitution for api_key and custom_tags; metrics reference renamed to bifrost.request.cost.usd (Distribution) with a migration section; added bifrost_node automatic tag.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested Reviewers

  • akshaydeo
  • danpiths

Poem

🐰 I hopped through charts and schema wide,
Added keys where configs hide,
Env vars whisper values true,
Metrics renamed and docs anew,
A quiet hop — the connector’s tuned!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add support for DD env vars with helm & doc changes' accurately describes the main changes: adding environment variable support for Datadog configuration and updating Helm charts and documentation.
Description check ✅ Passed The PR description comprehensively covers all required template sections: summary, changes with design decisions, type of change, affected areas, testing instructions, security considerations, and relevant checklist items are completed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 06-11-feat_add_support_for_dd_env_vars_with_helm_doc_changes

Comment @coderabbitai help to get the list of available commands and usage tips.

@CLAassistant

CLAassistant commented Jun 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@roroghost17
roroghost17 marked this pull request as ready for review June 10, 2026 20:18
@roroghost17
roroghost17 requested a review from a team as a code owner June 10, 2026 20:18
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — the changes are confined to schema declarations, Helm templating, and documentation; no Go runtime code is modified.

All new Datadog config fields are consistently propagated across transports/config.schema.json, values.schema.json, _helpers.tpl, values.yaml, and the CI validation script. The allOf conditional in the JSON schema and the matching Helm guard both correctly enforce api_key presence when agentless: true. Boolean fields use the hasKey pattern to allow explicit false values. The only gap is that disable_content_logging and request_headers are absent from the docs reference table, which is cosmetic and does not affect runtime behavior.

docs/enterprise/datadog-connector.mdx — the configuration reference table is missing rows for disable_content_logging and request_headers.

Important Files Changed

Filename Overview
transports/config.schema.json All nine new Datadog fields added with correct types, descriptions, and defaults; agentless/api_key conditional via allOf is well-formed.
helm-charts/bifrost/templates/_helpers.tpl Boolean fields use hasKey pattern correctly; string/array fields use truthiness; new Helm-level agentless+api_key validation guard added.
helm-charts/bifrost/values.schema.json Schema additions for new Datadog config fields and top-level version field look correct; custom_tags now has typed additionalProperties.
helm-charts/bifrost/values.yaml Commented-out examples are clear; values.yaml comment for request_headers mentions wildcard patterns but this is not reflected in the schema description.
docs/enterprise/datadog-connector.mdx Metric rename migration guide and env-var substitution examples are clear; disable_content_logging and request_headers added to schema/Helm but absent from the configuration reference table.
.github/workflows/scripts/validate-helm-config-fields.sh All new Datadog fields covered in both the input YAML block and the assertion section.

Reviews (3): Last reviewed commit: "feat: add support for DD env vars with h..." | Re-trigger Greptile

Comment thread helm-charts/bifrost/templates/_helpers.tpl
Comment thread docs/enterprise/datadog-connector.mdx
Comment thread helm-charts/bifrost/templates/_helpers.tpl

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
helm-charts/bifrost/values.schema.json (1)

875-929: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Document all new Datadog config fields and env var substitution support.

All nine newly added fields lack descriptions, making it difficult for users to understand their purpose and usage directly from the schema. Additionally, the PR introduces environment variable substitution for several fields, but the schema does not document this capability.

Issues:

  1. Missing descriptions for all new fields:

    • version (line 875): Should describe the connector config schema version
    • ml_app (line 885): Should explain the ML application identifier
    • dogstatsd_addr (line 891): Should describe the DogStatsD endpoint and when to use it
    • enable_metrics (line 903): Should clarify what metrics are enabled
    • enable_llm_obs (line 909): Should explain LLM observability features
    • disable_content_logging (line 912): Should describe what content is excluded from logs
    • agentless (line 915): Should document the difference between agent and agentless modes
    • api_key (line 918): Should explain when required and that it's for Datadog API access
    • site (line 921): Should document the Datadog site (e.g., datadoghq.com, datadoghq.eu)
    • request_headers (line 924): Should list which request headers are captured
  2. Missing env var substitution documentation: Per the coding guidelines and PR description, agent_addr (line 888), dogstatsd_addr (line 891), api_key (line 918), and custom_tags (line 900) support env.VAR_NAME substitution, but none of these fields document this in their descriptions. This is critical for security (keeping secrets out of config files) and for the Kubernetes use case (injecting node-local addresses via status.hostIP).

  3. Unclear env var support for custom_tags: The field is defined as type: object (line 900-902) with no additionalProperties constraint. If individual tag values can be env var references like "env.MY_TAG", the schema should clarify this, either in the description or by constraining additionalProperties to document the string-based env var pattern.

📝 Suggested improvements

For fields supporting env var substitution, follow the pattern used elsewhere in this schema. Examples:

  • otelEndpoint (lines 3548-3564): documents and validates env.VAR_NAME pattern with anyOf and regex
  • Proxy url (lines 4256-4268): uses oneOf with pattern validation
  • ca_cert_pem (line 4196): documents "Supports inline PEM or env.VAR_NAME" in description

At minimum, add descriptions documenting env var support:

 "agent_addr": {
-  "type": "string"
+  "type": "string",
+  "description": "Datadog Agent address for trace/metric submission (e.g., 'localhost:8126'). Supports env.VAR_NAME for environment variable substitution."
 },
 "dogstatsd_addr": {
-  "type": "string"
+  "type": "string",
+  "description": "DogStatsD endpoint address for metrics (e.g., 'localhost:8125'). Supports env.VAR_NAME for environment variable substitution."
 },

For stronger validation, consider using anyOf with pattern matching similar to otelEndpoint.

For custom_tags, clarify whether values can be env refs:

 "custom_tags": {
-  "type": "object"
+  "type": "object",
+  "description": "Custom tags to add to all Datadog spans and metrics. Values can use env.VAR_NAME for environment variable substitution.",
+  "additionalProperties": {
+    "type": "string"
+  }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@helm-charts/bifrost/values.schema.json` around lines 875 - 929, Add
descriptive "description" strings for the new Datadog fields (the top-level
"version" and all keys under "config": "ml_app", "dogstatsd_addr",
"enable_metrics", "enable_traces", "enable_llm_obs", "disable_content_logging",
"agentless", "api_key", "site", "request_headers", and "custom_tags") explaining
purpose and usage (e.g., connector schema version, ML app identifier, DogStatsD
endpoint, what metrics/LLM observability are enabled, what content is excluded,
agent vs agentless behavior, Datadog API key usage, Datadog site values, and
which request headers are captured). For fields that support env var
substitution (agent_addr, dogstatsd_addr, api_key, custom_tags), update their
descriptions to explicitly state "supports env.VAR_NAME substitution" and, where
stronger validation is desired, mirror the existing pattern used by otelEndpoint
or proxy.url: replace the simple "type" with an anyOf/oneOf that allows either a
direct typed value or a string matching the env.VAR_NAME regex (and for
custom_tags clarify whether values may be "env.VAR_NAME" by constraining
additionalProperties to string/ env pattern or documenting it in the
description). Ensure you reference and update the same JSON schema nodes for
"version" and the "config" object properties named above.

Source: Coding guidelines

docs/enterprise/datadog-connector.mdx (1)

61-76: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add missing fields to configuration table.

The disable_content_logging and request_headers fields are added to the Helm chart (in values.yaml lines 530-531 and _helpers.tpl lines 1215-1217, 1227-1229) and explicitly listed in the PR objectives, but are missing from this configuration table. Users consulting the docs won't discover these options.

Suggest adding rows for completeness:

Field Type Required Default Description
disable_content_logging bool No false Drop message content from exported spans
request_headers array No - Header name patterns to capture (exact or wildcard like x-custom-*)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/enterprise/datadog-connector.mdx` around lines 61 - 76, Add the two
missing configuration rows to the Datadog connector config table: include
`disable_content_logging` (type: bool, Required: No, Default: false,
Description: Drop message content from exported spans) and `request_headers`
(type: array, Required: No, Default: -, Description: Header name patterns to
capture, exact or wildcard like `x-custom-*`) in the same table in
docs/enterprise/datadog-connector.mdx so the docs match the Helm chart and PR
objectives.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/enterprise/datadog-connector.mdx`:
- Around line 61-76: Add the two missing configuration rows to the Datadog
connector config table: include `disable_content_logging` (type: bool, Required:
No, Default: false, Description: Drop message content from exported spans) and
`request_headers` (type: array, Required: No, Default: -, Description: Header
name patterns to capture, exact or wildcard like `x-custom-*`) in the same table
in docs/enterprise/datadog-connector.mdx so the docs match the Helm chart and PR
objectives.

In `@helm-charts/bifrost/values.schema.json`:
- Around line 875-929: Add descriptive "description" strings for the new Datadog
fields (the top-level "version" and all keys under "config": "ml_app",
"dogstatsd_addr", "enable_metrics", "enable_traces", "enable_llm_obs",
"disable_content_logging", "agentless", "api_key", "site", "request_headers",
and "custom_tags") explaining purpose and usage (e.g., connector schema version,
ML app identifier, DogStatsD endpoint, what metrics/LLM observability are
enabled, what content is excluded, agent vs agentless behavior, Datadog API key
usage, Datadog site values, and which request headers are captured). For fields
that support env var substitution (agent_addr, dogstatsd_addr, api_key,
custom_tags), update their descriptions to explicitly state "supports
env.VAR_NAME substitution" and, where stronger validation is desired, mirror the
existing pattern used by otelEndpoint or proxy.url: replace the simple "type"
with an anyOf/oneOf that allows either a direct typed value or a string matching
the env.VAR_NAME regex (and for custom_tags clarify whether values may be
"env.VAR_NAME" by constraining additionalProperties to string/ env pattern or
documenting it in the description). Ensure you reference and update the same
JSON schema nodes for "version" and the "config" object properties named above.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3484ca54-0a6a-4865-badd-32f21d0a972b

📥 Commits

Reviewing files that changed from the base of the PR and between 9908b7c and 584be06.

📒 Files selected for processing (4)
  • docs/enterprise/datadog-connector.mdx
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml

@roroghost17
roroghost17 force-pushed the 06-11-feat_add_support_for_dd_env_vars_with_helm_doc_changes branch from 584be06 to 5482458 Compare June 11, 2026 06:09

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
helm-charts/bifrost/values.schema.json (1)

869-936: ⚠️ Potential issue | 🟡 Minor

Align Helm Datadog plugin schema with transports/config.schema.json

Helm plugins.datadog.config uses the same Datadog fields and JSON-schema types as transports/config.schema.json (e.g., service_name, ml_app, agent_addr, dogstatsd_addr, env, version, enable_metrics, enable_traces, enable_llm_obs, disable_content_logging, agentless, api_key, site, request_headers, plugin_span_filter), and plugin_span_filter matches ($defs.pluginSpanFilter with additionalProperties: false).

However, the Helm schema is less strict than the authoritative one:

  • plugins.datadog.config.additionalProperties is not set in Helm (should be false).
  • custom_tags in Helm is { "type": "object" } only (should restrict additionalProperties to { "type": "string" }).
  • plugins.datadog.version in Helm has minimum: 1 but misses maximum: 32767 (present in the shared plugin version schema).
  • Helm doesn’t declare required: ["config"] for the datadog plugin block (the authoritative schema requires config when name: datadog).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@helm-charts/bifrost/values.schema.json` around lines 869 - 936, The datadog
plugin schema is too permissive—update the "datadog" block so it matches
transports/config.schema.json: add "required": ["config"] to the datadog object,
set "datadog.config.additionalProperties": false, change
"datadog.config.properties.custom_tags" to restrict additionalProperties to {
"type": "string" } (instead of a free object), and add "maximum": 32767 to
"datadog.version"; keep the existing "$ref" to "$defs/pluginSpanFilter" for
plugin_span_filter as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@helm-charts/bifrost/templates/_helpers.tpl`:
- Around line 1218-1223: The chart allows agentless: true without an api_key, so
add a Helm validation guard in the bifrost.validate template that fails
rendering when agentless is enabled but api_key is missing: inside the
bifrost.validate helper check the templated values ($inputConfig and
$datadogConfig) and if hasKey $inputConfig "agentless" and
$inputConfig.agentless is true and either not hasKey $inputConfig "api_key" or
$inputConfig.api_key is empty, call the Helm fail function with a clear message;
apply the same guard for the equivalent block referenced around lines 1432-1437
so both agentless/api_key code paths validate at render time.

In `@helm-charts/bifrost/values.schema.json`:
- Around line 885-893: Add descriptive "description" entries for the three
schema properties in values.schema.json: for "ml_app" document that it is the ML
application name used for Datadog LLM Observability; for "agent_addr" document
that it is the Datadog agent address, support runtime substitution using the
env.VAR_NAME prefix (e.g., env.DD_AGENT_ADDR) and note it applies to agent mode
only; for "dogstatsd_addr" document that it is the DogStatsD agent address,
support runtime substitution using the env.VAR_NAME prefix (e.g.,
env.DD_DOGSTATSD_ADDR) and note it applies to agent mode only; ensure the
descriptions are added alongside the existing "type":"string" for the "ml_app",
"agent_addr", and "dogstatsd_addr" properties.
- Around line 900-902: Update the JSON schema for the custom_tags property in
values.schema.json: ensure "custom_tags" remains "type": "object", add a
descriptive "description" stating these are custom tags for Datadog
metrics/traces and that values may use the env.VAR_NAME prefix for environment
variable substitution, and add "additionalProperties": { "type": "string" } so
all custom tag values are validated as strings.
- Around line 903-929: Add missing "description" entries to the Datadog-related
schema fields (enable_metrics, enable_traces, enable_llm_obs,
disable_content_logging, agentless, api_key, site, request_headers): describe
enable_metrics as toggling Datadog metrics export, enable_llm_obs as toggling
Datadog LLM Observability, disable_content_logging as excluding sensitive
content (prompts, completions, embeddings) from traces when true, agentless as
enabling agentless mode (requires api_key and site), api_key as the Datadog API
key for agentless mode and note support for env.VAR_NAME substitution (e.g.,
env.DD_API_KEY) for secure env var usage, site as the Datadog site for agentless
mode (examples: datadoghq.com, datadoghq.eu), and request_headers as a list of
request header names to capture in Datadog trace metadata; update the JSON
schema entries for those properties to include these descriptions.

In `@transports/config.schema.json`:
- Around line 1737-1745: Add a JSON Schema conditional so that when the boolean
property "agentless" is true the "api_key" string property is required: inside
the same object that defines "agentless" and "api_key" add an "if":
{"properties": {"agentless": {"const": true}}}, "then": {"required":
["api_key"]} rule (and leave "else" unspecified) so validation fails early for
configs where config.agentless === true but api_key is missing; update any
related schema descriptions if needed to reflect this constraint.

---

Outside diff comments:
In `@helm-charts/bifrost/values.schema.json`:
- Around line 869-936: The datadog plugin schema is too permissive—update the
"datadog" block so it matches transports/config.schema.json: add "required":
["config"] to the datadog object, set "datadog.config.additionalProperties":
false, change "datadog.config.properties.custom_tags" to restrict
additionalProperties to { "type": "string" } (instead of a free object), and add
"maximum": 32767 to "datadog.version"; keep the existing "$ref" to
"$defs/pluginSpanFilter" for plugin_span_filter as-is.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5e782c34-3b0e-4007-a5f9-bbde72059749

📥 Commits

Reviewing files that changed from the base of the PR and between 584be06 and 5482458.

📒 Files selected for processing (6)
  • .github/workflows/scripts/validate-helm-config-fields.sh
  • docs/enterprise/datadog-connector.mdx
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json

Comment thread helm-charts/bifrost/templates/_helpers.tpl
Comment thread helm-charts/bifrost/values.schema.json
Comment thread helm-charts/bifrost/values.schema.json
Comment thread helm-charts/bifrost/values.schema.json
Comment thread transports/config.schema.json
@roroghost17
roroghost17 force-pushed the 06-11-feat_add_support_for_dd_env_vars_with_helm_doc_changes branch from 5482458 to 55dbc67 Compare June 11, 2026 06:40

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
helm-charts/bifrost/values.schema.json (1)

879-949: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Enforce api_key when agentless is enabled.

At Line 879, datadog.config adds agentless and api_key, but there is no schema conditional enforcing api_key when agentless: true. That lets invalid values pass Helm schema validation and fail later at runtime.

Suggested schema fix
                 "config": {
                   "type": "object",
                   "properties": {
@@
                     "plugin_span_filter": {
                       "$ref": "`#/`$defs/pluginSpanFilter"
                     }
-                  }
+                  },
+                  "allOf": [
+                    {
+                      "if": {
+                        "properties": {
+                          "agentless": { "const": true }
+                        },
+                        "required": ["agentless"]
+                      },
+                      "then": {
+                        "required": ["api_key"]
+                      }
+                    }
+                  ]
                 }

As per coding guidelines, schema updates should preserve strict config contracts and reflect documented Datadog behavior, including conditional requirements for agentless mode.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@helm-charts/bifrost/values.schema.json` around lines 879 - 949, The
datadog.config schema currently allows agentless: true without requiring
api_key; add a JSON Schema conditional under the "config" object that uses "if":
{"properties": {"agentless": {"const": true}}} and "then": {"required":
["api_key"]} so that when agentless is true the api_key string property is
required; update any related descriptions (e.g., "agentless", "api_key") and
ensure the rule references the existing "agentless" and "api_key" properties and
the $ref'ed pluginSpanFilter remains unchanged.

Source: Coding guidelines

docs/enterprise/datadog-connector.mdx (1)

61-76: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add request_headers to the Datadog configuration fields table.

The table documents the expanded Datadog config surface but omits request_headers, which is now part of the exposed config and referenced elsewhere in this PR context.

As per coding guidelines, docs must maintain parity with code/schema and the referenced Datadog config fields include request_headers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/enterprise/datadog-connector.mdx` around lines 61 - 76, Add a table row
for the missing request_headers config: add a row with the field name
`request_headers`, type `array` (or `string[]` per schema), Required = No,
Default = - (or indicate it uses env.VAR_NAME if applicable), and Description =
"List of request header names to capture/include in Datadog traces/metrics" so
the docs match the exposed config and schema referencing `request_headers`.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/enterprise/datadog-connector.mdx`:
- Around line 61-76: Add a table row for the missing request_headers config: add
a row with the field name `request_headers`, type `array` (or `string[]` per
schema), Required = No, Default = - (or indicate it uses env.VAR_NAME if
applicable), and Description = "List of request header names to capture/include
in Datadog traces/metrics" so the docs match the exposed config and schema
referencing `request_headers`.

In `@helm-charts/bifrost/values.schema.json`:
- Around line 879-949: The datadog.config schema currently allows agentless:
true without requiring api_key; add a JSON Schema conditional under the "config"
object that uses "if": {"properties": {"agentless": {"const": true}}} and
"then": {"required": ["api_key"]} so that when agentless is true the api_key
string property is required; update any related descriptions (e.g., "agentless",
"api_key") and ensure the rule references the existing "agentless" and "api_key"
properties and the $ref'ed pluginSpanFilter remains unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cd3e1d23-249d-4cff-9214-62942983f79a

📥 Commits

Reviewing files that changed from the base of the PR and between 5482458 and 55dbc67.

📒 Files selected for processing (6)
  • .github/workflows/scripts/validate-helm-config-fields.sh
  • docs/enterprise/datadog-connector.mdx
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml
  • transports/config.schema.json

Pratham-Mishra04 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Merge activity

  • Jun 11, 7:41 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 11, 7:42 AM UTC: @Pratham-Mishra04 merged this pull request with Graphite.

@Pratham-Mishra04
Pratham-Mishra04 merged commit ac3d5d0 into dev Jun 11, 2026
13 of 16 checks passed
@Pratham-Mishra04
Pratham-Mishra04 deleted the 06-11-feat_add_support_for_dd_env_vars_with_helm_doc_changes branch June 11, 2026 07:42
akshaydeo pushed a commit that referenced this pull request Jun 12, 2026
## Summary

Expands the Datadog connector's Helm chart and documentation to expose the full set of connector configuration fields, and adds environment variable substitution support for `agent_addr` and `dogstatsd_addr`.

## Changes

- `agent_addr` and `dogstatsd_addr` now accept `EnvVar` values (e.g. `env.DD_AGENT_ADDR`, `env.DD_DOGSTATSD_ADDR`), enabling dynamic address resolution at runtime — useful for injecting a node-local Datadog agent's address via `status.hostIP` in Kubernetes.
- Added `ml_app`, `dogstatsd_addr`, `enable_metrics`, `enable_llm_obs`, `disable_content_logging`, `agentless`, `api_key`, `site`, and `request_headers` to the Helm chart's `_helpers.tpl`, `values.schema.json`, and `values.yaml` so all connector options are configurable via Helm.
- Added a `version` field to the connector schema at the top level.
- Updated `values.yaml` with inline comments documenting agentless mode, env var substitution, and optional fields.
- Updated documentation to reflect that `agent_addr` and `dogstatsd_addr` support `env.VAR_NAME` substitution, and added corresponding examples to the environment variable substitution section.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [x] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [x] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [x] Docs

## How to test

Deploy Bifrost via Helm with the Datadog connector configured using `env.VAR_NAME` references for `agent_addr` and `dogstatsd_addr`, and verify the connector resolves the addresses from the injected environment variables at runtime.

```sh
helm upgrade --install bifrost ./helm-charts/bifrost \
  --set bifrost.connectors.datadog.enabled=true \
  --set bifrost.connectors.datadog.config.agent_addr="env.DD_AGENT_ADDR" \
  --set bifrost.connectors.datadog.config.dogstatsd_addr="env.DD_DOGSTATSD_ADDR"
```

Confirm that previously unsupported fields (`ml_app`, `enable_metrics`, `enable_llm_obs`, `agentless`, `api_key`, `site`, `request_headers`) are correctly rendered into the generated config.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

`api_key` supports `env.VAR_NAME` substitution, ensuring Datadog API keys are not hardcoded in Helm values and can be injected securely via Kubernetes secrets or environment variables.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Documentation**
  * Clarified env.VAR_NAME substitution for Datadog config fields with updated examples; updated metrics reference for renamed metric and type change with migration guidance; added new automatic tag (bifrost_node).

* **New Features**
  * Added expanded Datadog configuration options: ML/LLM observability toggles, metrics enablement, agentless/API settings, DogStatsD address, request header support, and app identification; Helm charts now validate required API key when agentless is enabled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
## Summary

Expands the Datadog connector's Helm chart and documentation to expose the full set of connector configuration fields, and adds environment variable substitution support for `agent_addr` and `dogstatsd_addr`.

## Changes

- `agent_addr` and `dogstatsd_addr` now accept `EnvVar` values (e.g. `env.DD_AGENT_ADDR`, `env.DD_DOGSTATSD_ADDR`), enabling dynamic address resolution at runtime — useful for injecting a node-local Datadog agent's address via `status.hostIP` in Kubernetes.
- Added `ml_app`, `dogstatsd_addr`, `enable_metrics`, `enable_llm_obs`, `disable_content_logging`, `agentless`, `api_key`, `site`, and `request_headers` to the Helm chart's `_helpers.tpl`, `values.schema.json`, and `values.yaml` so all connector options are configurable via Helm.
- Added a `version` field to the connector schema at the top level.
- Updated `values.yaml` with inline comments documenting agentless mode, env var substitution, and optional fields.
- Updated documentation to reflect that `agent_addr` and `dogstatsd_addr` support `env.VAR_NAME` substitution, and added corresponding examples to the environment variable substitution section.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [x] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [x] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [x] Docs

## How to test

Deploy Bifrost via Helm with the Datadog connector configured using `env.VAR_NAME` references for `agent_addr` and `dogstatsd_addr`, and verify the connector resolves the addresses from the injected environment variables at runtime.

```sh
helm upgrade --install bifrost ./helm-charts/bifrost \
  --set bifrost.connectors.datadog.enabled=true \
  --set bifrost.connectors.datadog.config.agent_addr="env.DD_AGENT_ADDR" \
  --set bifrost.connectors.datadog.config.dogstatsd_addr="env.DD_DOGSTATSD_ADDR"
```

Confirm that previously unsupported fields (`ml_app`, `enable_metrics`, `enable_llm_obs`, `agentless`, `api_key`, `site`, `request_headers`) are correctly rendered into the generated config.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

`api_key` supports `env.VAR_NAME` substitution, ensuring Datadog API keys are not hardcoded in Helm values and can be injected securely via Kubernetes secrets or environment variables.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Documentation**
  * Clarified env.VAR_NAME substitution for Datadog config fields with updated examples; updated metrics reference for renamed metric and type change with migration guidance; added new automatic tag (bifrost_node).

* **New Features**
  * Added expanded Datadog configuration options: ML/LLM observability toggles, metrics enablement, agentless/API settings, DogStatsD address, request header support, and app identification; Helm charts now validate required API key when agentless is enabled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
occcat pushed a commit to occcat/bifrost that referenced this pull request Sep 2, 2026
## Summary

Expands the Datadog connector's Helm chart and documentation to expose the full set of connector configuration fields, and adds environment variable substitution support for `agent_addr` and `dogstatsd_addr`.

## Changes

- `agent_addr` and `dogstatsd_addr` now accept `EnvVar` values (e.g. `env.DD_AGENT_ADDR`, `env.DD_DOGSTATSD_ADDR`), enabling dynamic address resolution at runtime — useful for injecting a node-local Datadog agent's address via `status.hostIP` in Kubernetes.
- Added `ml_app`, `dogstatsd_addr`, `enable_metrics`, `enable_llm_obs`, `disable_content_logging`, `agentless`, `api_key`, `site`, and `request_headers` to the Helm chart's `_helpers.tpl`, `values.schema.json`, and `values.yaml` so all connector options are configurable via Helm.
- Added a `version` field to the connector schema at the top level.
- Updated `values.yaml` with inline comments documenting agentless mode, env var substitution, and optional fields.
- Updated documentation to reflect that `agent_addr` and `dogstatsd_addr` support `env.VAR_NAME` substitution, and added corresponding examples to the environment variable substitution section.

## Type of change

- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [x] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [x] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [x] Docs

## How to test

Deploy Bifrost via Helm with the Datadog connector configured using `env.VAR_NAME` references for `agent_addr` and `dogstatsd_addr`, and verify the connector resolves the addresses from the injected environment variables at runtime.

```sh
helm upgrade --install bifrost ./helm-charts/bifrost \
  --set bifrost.connectors.datadog.enabled=true \
  --set bifrost.connectors.datadog.config.agent_addr="env.DD_AGENT_ADDR" \
  --set bifrost.connectors.datadog.config.dogstatsd_addr="env.DD_DOGSTATSD_ADDR"
```

Confirm that previously unsupported fields (`ml_app`, `enable_metrics`, `enable_llm_obs`, `agentless`, `api_key`, `site`, `request_headers`) are correctly rendered into the generated config.

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

`api_key` supports `env.VAR_NAME` substitution, ensuring Datadog API keys are not hardcoded in Helm values and can be injected securely via Kubernetes secrets or environment variables.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Documentation**
  * Clarified env.VAR_NAME substitution for Datadog config fields with updated examples; updated metrics reference for renamed metric and type change with migration guidance; added new automatic tag (bifrost_node).

* **New Features**
  * Added expanded Datadog configuration options: ML/LLM observability toggles, metrics enablement, agentless/API settings, DogStatsD address, request header support, and app identification; Helm charts now validate required API key when agentless is enabled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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