Custom perf instrumentation for [airflow -> node] flow without http header? #1922
-
We are in a situation where airflow is spinning up node.js Jobs dynamically on our kubernetes cluster, which in turn run "scripts" in our existing node.js codebase. We'd like to introduce distributed traces as a way to completely monitor this process e2e. both on airflow and on node.js level. As far as I understand right now, it looks like sentry instrumentation would always add transaction ids to outgoing http requests. What I would like to work towards is a way to generate the transaction Id inside the airflow job, and whenever we create the "command" to run on the node.js instance we would be able to pass that transactionId along like so: Is there any documentation on this? Is there any drawbacks that would make this difficult? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @pepf ! You could create a transaction in airflow with The information you need to give from airflow to the node script is the We have discussions about supporting something like you suggested, but with environment variables here: https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md Unfortunately this RFC and the links in there are the only documentation we have for this. |
Beta Was this translation helpful? Give feedback.
Hello @pepf !
You could create a transaction in airflow with
transaction = start_transaction(...)
and then you could give some information to the node script and in the node script dotransaction = Transaction.continue_from_headers(...)
.The information you need to give from airflow to the node script is the
baggage
andsentry-trace
information that normally is sent via HTTP headers.We have discussions about supporting something like you suggested, but with environment variables here: https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md
Unfortunately this RFC and the links in there are the only documentation we have for this.
Does this help you …