What's the correct way to hook up Airbyte to OTEL ...
# replication-troubleshooting
j
What's the correct way to hook up Airbyte to OTEL inside Kubernetes? I'm guessing that setting the
metrics.metricsClient: otel
but the
OTEL_COLECTOR_ENDPOINT
is sort of dynamic since it needs to be set to the host IP of the pod -- ie: it can't come directly from the configmap
Can the worker be configured any other way? Perhaps another environment variable that the otel library uses?
a
what about k8s DNS? I assume it exposes a service?
j
I have DataDog agent running on each of the hosts. I could use the datadog metric client I believe; but I'm also interested in seeing how it works with OTEL collector. The issue is that the datadog agent is a daemonset listening on the host port; so in order for the pod to use it; it ineeds to be given the Host IP as it's OTEL collector endpoint; not ideal. I could use
extraEnv
if I know that it will pick up the traditional OTEL environment variable for this like
OTEL_EXPORTER_OTLP_ENDPOINT
but the way things are configured at the moment; leads me to believe it is explicitly set via the configmap environment variable and the defaults are not honored (See: https://github.com/airbytehq/airbyte-platform/blob/e83fc6b96909fd1cf95eb6f80685285[…]main/java/io/airbyte/metrics/lib/OpenTelemetryMetricClient.java)
w
Hey @Justen Walker - Sorry for reviving an old thread, I see that this is the only post for experimenting with Otel on Datadog agent here so was curious on how did you manage to go about it 👀 Ended up with the dynamic IP issue you faced as well
j
I ended up running my own otel-collector inside the airbyte namespace and pointed the metrics client at the service using cluster dns. opentelemetry-collector-contrib has the ability to ship metrics directly to datadog :
Copy code
otel-collector-config.yaml: |
    "exporters":
      "datadog":
        "api":
          "key": "${env:DD_API_KEY}"
          "site": "${env:DD_SITE}"
it can also add filters and other stuff to and export to multiple locations; I use to it export a prometheus endpoint and to drop certain high cardinality metrics like
Copy code
source_hearbeat_failure
source_time_since_last_heartbeat_millis
replication_bytes_synced
replication_records_synced
temporal_workflow_success
temporal_workflow_attempt
temporal_workflow_failure
record_schema_validation_error
schemas_unexpected_fields
(I found these were a source excessive custom metrics indexed by DD; removing them significantly decreased our bill, don't know how useful they are to you; but they were not very useful to us)
w
Thanks for that reference! will probably spin up that otel collector too if everything works out well. We were exploring this since DD is indexing quite a lot of high frequency metrics from the internal temporal SDK (most of them are related to latency), and reading through the source code, it seems like using OTEL would disable that
For us, these were the big culprits in spiking up DD custom metrics cost, putting it here in case you face the same thing too. I will also check those high cardinality metrics you posted on
j
things that have
connection_id
in the label list typically contribute the most. But temporal workflows will too since they will have a
workflow
id which any connection may have N associated workflows so its cardinality is M x N (or maybe just N if it doesn't also add the connection id)
thanks for the list though I'll keep an eye on those too
🔥 1
w
cc. @Sidharrth Nagappan @Abid Ebna Saif Utsha