Somewhat similar to what I did here: https://github.com/traceloop/openllmetry/pull/2175/files#diff-fe0c3dd92398a0c6bbd928f23f57b3a35ad415b6a24a0d110f220b16f3258722 I am not sure it is that simple in TS, but I am willing to submit a PR!