<@U04S8PLJWMT> I'm getting this error during sync ...
# ask-ai
s
@kapa.ai I'm getting this error during sync process:
Copy code
[dd.trace 2025-11-10 16:16:47:401 +0000] [dd-trace-processor] WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 2 (size=2KB) traces. Total: 2, Received: 2, Sent: 0, Failed: 2. java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:8126 (Will not log warnings for 5 minutes)
k
The error message you are seeing:
Copy code
[dd.trace 2025-11-10 16:16:47:401 +0000] [dd-trace-processor] WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 2 (size=2KB) traces. Total: 2, Received: 2, Sent: 0, Failed: 2. java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:8126 (Will not log warnings for 5 minutes)
indicates that the Datadog tracer is unable to connect to the Datadog Agent on port
8126
at
localhost
. This is a common issue when the Datadog Agent is either not running, not accessible at the expected address, or not properly networked with the Airbyte service. Based on the knowledge sources, here are some troubleshooting steps: 1. Ensure the Datadog Agent is Running and Accessible The Datadog Agent must be running and reachable from the Airbyte service. If you are running Airbyte and the Datadog Agent in separate containers, make sure they are on the same Docker network, or use
network_mode: "host"
to allow communication via
localhost
as needed. If the agent is not containerized, it may not be reachable from within the Airbyte container unless special networking is configured. Users have reported that running the agent as a container and ensuring proper network configuration resolved similar issues [Setup Datadog monitoring](https://discuss.airbyte.io/t/1270). 2. Check Environment Variables Make sure you have set the following environment variables for the Airbyte worker (or relevant service): -
PUBLISH_METRICS=true
-
DD_AGENT_HOST
(should point to the Datadog Agent's hostname or IP) -
DD_DOGSTATSD_PORT=8125
(for metrics; for traces, ensure port 8126 is open) If you use
localhost
or
127.0.0.1
as the agent host, the agent must be running in the same network namespace as the Airbyte service. Otherwise, use the container name or service name as the host. 3. Verify Port Exposure Ensure that port
8126
is exposed and mapped correctly in your Datadog Agent container configuration. 4. Logs and Further Troubleshooting If the agent is running but you still see connection errors, check the agent logs for errors related to port binding or network access. Also, consult the Datadog documentation for troubleshooting Docker log collection and agent connectivity issues [Datadog monitoring](https://discuss.airbyte.io/t/1963). Summary: This error is almost always due to the Airbyte service being unable to reach the Datadog Agent on the expected port and address. Double-check your Docker networking, environment variables, and agent status to resolve the issue. If you continue to have problems, consider running both services in the same Docker network and using the service/container name as the
DD_AGENT_HOST
value. If you need more detailed help, please provide your Docker Compose or Kubernetes configuration for both Airbyte and the Datadog Agent.
s
@kapa.ai why am I seeing this error anyway? I'm not using DataDog monitoring - neither in Airbyte, my EKS cluster nor replication-job pod where this error came up
k
A message from kapa.ai
Based on the knowledge sources, Airbyte supports Datadog monitoring via environment variables and configuration options, but this feature is only active if you explicitly enable it by setting variables like
PUBLISH_METRICS=true
and configuring
METRIC_CLIENT
to
datadog
or
otel
in your deployment. By default, these features are not enabled—`PUBLISH_METRICS` defaults to
false
and
METRIC_CLIENT
defaults to
none
unless you override them in your configuration files or environment variables [Configuring Airbyte - Monitoring](https://docs.airbyte.com/platform/1.8/operator-guides/configuring-airbyte#monitoring). If you are seeing Datadog-related errors (such as failed connections to the Datadog Agent) even though you have not enabled Datadog monitoring in Airbyte, your deployment may have inherited default environment variables or configuration from a template, Helm chart, or Docker Compose file that includes these settings. For example, some Airbyte deployment templates and forum posts show
PUBLISH_METRICS=true
and Datadog agent host/port variables set by default [Forum Post: Setup Datadog monitoring](https://discuss.airbyte.io/t/1270), [Forum Post: Datadog monitoring](https://discuss.airbyte.io/t/1963). What to check: - Review your Airbyte deployment configuration (Helm values, environment variables, ConfigMaps, etc.) for any references to
PUBLISH_METRICS
,
METRIC_CLIENT
,
DD_AGENT_HOST
, or
DD_AGENT_PORT
. - If any of these are set (even if you did not intend to use Datadog), Airbyte will attempt to send metrics or traces to a Datadog agent, resulting in connection errors if no agent is present. - Remove or unset these variables to prevent Airbyte from attempting to connect to Datadog. Summary: You are likely seeing this error because some Datadog-related environment variables are set in your Airbyte deployment, even if you did not intend to use Datadog monitoring. Removing or disabling these settings should resolve the error. If you cannot find these variables in your configuration, check for inherited defaults in your deployment templates or Helm charts [Configuring Airbyte - Monitoring](https://docs.airbyte.com/platform/1.8/operator-guides/configuring-airbyte#monitoring).
s
@kapa.ai you are wrong,
PUBLISH_METRICS
is set to true by default
k
A message from kapa.ai
According to the official Airbyte documentation,
PUBLISH_METRICS
defaults to false. This is explicitly stated in multiple versions of the documentation: >
PUBLISH_METRICS
- Defines whether to publish metrics collected by the Metrics Reporter. Defaults to false. [Configuring Airbyte - Monitoring](https://docs.airbyte.com/platform/1.8/operator-guides/configuring-airbyte#monitoring) This means that unless you or your deployment process explicitly set
PUBLISH_METRICS=true
, Airbyte should not attempt to publish metrics or connect to Datadog by default. If you are seeing Datadog-related errors, it is likely that
PUBLISH_METRICS
or other related environment variables (
METRIC_CLIENT
,
DD_AGENT_HOST
, etc.) are being set somewhere in your deployment configuration, possibly inherited from a template, Helm values file, or environment variable overrides. Please review your deployment files to ensure these are not set unintentionally. If you are certain you did not set these, but still see the error, it may be worth checking for: - Default values in Helm charts or Docker Compose files you are using. - Environment variables injected by your CI/CD or infrastructure automation. If you need further help, please provide your deployment configuration for review. Summary: The knowledge sources confirm that
PUBLISH_METRICS
is not set to true by default; it defaults to false. If you see Datadog connection errors, it is likely due to explicit or inherited configuration in your environment [Configuring Airbyte - Monitoring](https://docs.airbyte.com/platform/1.8/operator-guides/configuring-airbyte#monitoring).
s
@kapa.ai ok, thanks. I see that
global.metrics.enabled
is set to false in
values.yaml
, but
PUBLISH_METRICS
is set to true in my env. I will look into it.
k
A message from kapa.ai
You're on the right track. In Airbyte, there can be a difference between what is set in your
values.yaml
(such as
global.metrics.enabled
) and what is actually present in the environment variables of your running pods or containers (like
PUBLISH_METRICS
). According to the documentation,
PUBLISH_METRICS
is the environment variable that directly controls whether metrics are published by the Metrics Reporter, and it defaults to
false
unless explicitly set to
true
in your environment or configuration. If
PUBLISH_METRICS
is set to
true
in your environment, Airbyte will attempt to publish metrics regardless of the value of
global.metrics.enabled
in your
values.yaml
file [Configuring Airbyte - Monitoring](https://docs.airbyte.com/platform/1.8/operator-guides/configuring-airbyte#monitoring). This means that if you see
PUBLISH_METRICS=true
in your environment, Airbyte will try to send metrics (and potentially traces) to the configured client (e.g., Datadog or OpenTelemetry), which could explain the errors you are seeing—even if
global.metrics.enabled
is
false
in your Helm values. Action: - Double-check your environment variables and deployment configuration to ensure
PUBLISH_METRICS
is not set to
true
unless you intend to enable metrics publishing. - Remember that environment variables can override Helm values or other configuration settings, depending on how your deployment is structured. If you align both your
values.yaml
and your environment variables to disable metrics, the errors should stop.
s
@kapa.ai ok, I see where is the problem. Template looks for `global.metrics.publish`:
Copy code
{{/*
Renders the global.metrics.publish value
*/}}
{{- define "airbyte.metrics.publish" }}
	{{- if eq .Values.global.metrics.publish nil }}
    	{{- true }}
	{{- else }}
    	{{- .Values.global.metrics.publish }}
	{{- end }}
{{- end }}
but there is nothing like this in
values.yaml
, there is only
global.metrics.enabled
k
A message from kapa.ai
You are correct—according to the knowledge sources, the documented and supported key in
values.yaml
for enabling metrics is
global.metrics.enabled
, not
global.metrics.publish
. All official documentation and migration guides reference
global.metrics.enabled
as the way to control metrics publishing in Airbyte Helm deployments, and there is no mention of a
global.metrics.publish
key in the provided documentation or example values files [Upgrade to Helm chart V2 (Core) > How to upgrade](https://docs.airbyte.com/platform/deploying-airbyte/chart-v2-community#update-your-valuesyaml-file). If your Helm template is looking for
global.metrics.publish
, but your
values.yaml
only contains
global.metrics.enabled
, this could explain the unexpected behavior. The knowledge sources do not provide any information about a
global.metrics.publish
key, so it appears to be either a template bug or a custom modification not reflected in the official documentation. Summary: - The official and documented key is
global.metrics.enabled
. - There is no mention of
global.metrics.publish
in the knowledge sources. - If your template expects
global.metrics.publish
, but your
values.yaml
only has
global.metrics.enabled
, this mismatch could cause issues. You may want to align your template to use
global.metrics.enabled
as per the official documentation, or ensure that your
values.yaml
and templates are consistent. If this template is from a custom or modified chart, consider updating it to match the official Airbyte Helm chart structure [Upgrade to Helm chart V2 (Core) > How to upgrade](https://docs.airbyte.com/platform/deploying-airbyte/chart-v2-community#update-your-valuesyaml-file).