What would it take to implement Open Telemetry in the frontend?

I would like to collect information on how my dashboard is being used and how it is performing. The best option for that seems to be open telemetry which can be implemented on the Python side in a rather straight forward manner.

However, to really get the full insights from the client all the way to the backend, I would also need to implement open telemetry in the frontend code. A solution for Javascript is supported, for example, for React but I’m struggling a bit to see how I could do this via Panel.

Has anyone done this before? Do you have any thoughts on where to start? Thank you in advance for any pointers.

Hi @Midnighter

I have never tried this. But to me it seems like you just need to add the javascript as described here
opentelemetry-js/api at main · open-telemetry/opentelemetry-js (github.com)

you can do that in many ways.

As simple one is a HTML pane: pn.pane.HTML('<script> your js here </script>'). More advanced could be via pn.config.js_files['telemetry']=link to some js file....

Thanks, I’ll give that a try.

1 Like