Can i leverage <sidecars> to route logs to DataDog...
# ask-metaflow
p
Can i leverage sidecars to route logs to DataDog? Is there a better way? When working on bare kubernetes, this can be done in the with the k8s manifest, e.g. flient bit side car reading log files and sending them to DataDog.
a
p
I want logs, not metrics
a
Ah you would like all the logs to go to datadog?
👍 1
Wouldn’t just running the datadog operator (outside of metaflow) work?
p
if everything is to stdout and stderr correctly. However, stderr has a lot of non-error noise, such as when ArgoEvents are fired. I'd like to be able to map them to correct log level (info) instead of error simply because it's on the stderr pipe. We also have some custom DataDog tags, it would be nice to align with other jobs on the clusters to use the same tags and introduce tags like metaflow-run-id, metaflow-run-name, etc.
a
POSIX standards recommend diagnostic output to go to stderr https://pubs.opengroup.org/onlinepubs/9699919799/functions/stderr.html
p
sure. but they show up in DataDog as ERROR logs, which they aren't. they are more like DEBUG logs, most of the time. this is where adapters fit in. I'm asking how to add an adapter that is metaflow specific becuase other jobs on the cluster shouldn't use this adapter. In pure k8s, this would be solved with a sidecar on the job/pod. metaflow creates the k8s manifest. if the metaflow sidecar concept is not a good fit, is there an existing way to extend the k8s manifest in this way?