Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opentelemetry #476

Open
MTRNord opened this issue Jul 20, 2023 · 0 comments
Open

Opentelemetry #476

MTRNord opened this issue Jul 20, 2023 · 0 comments

Comments

@MTRNord
Copy link

MTRNord commented Jul 20, 2023

Hi,

for lack of a room to ask in :D

Would it make sense to add opentelemtry to this library? https://opentelemetry.io/docs/instrumentation/js/

I recently added this to the draupnir (mjolnir fork) appservice, and it is quite interesting, however since it uses the lib it is missing some parts in between currently. It would be nice to have spans for functions of the library. I am not sure what the best way to add them would be. In draupnir I used custom decorators. However, typescript 4 (stage 2) decorators are fairly limiting, so they only work for some functions (mainly class methods). (See https://github.com/MTRNord/Draupnir/blob/76f0433c246a9c91f31ad45f81d6b6aab2f19897/src/utils.ts#L508-L608 for example decorators that wrap nested or not nested spans around methods in classes).

The code I did results in this picture on incoming transactions:

image

Ideally, it would be nice to also get insight to what this sdk does to have better insight on potential areas that may have room for improvement in draupnir4all/appservices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant