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

Add example of tracer usage #55

Open
luke88jones opened this issue May 26, 2022 · 2 comments
Open

Add example of tracer usage #55

luke88jones opened this issue May 26, 2022 · 2 comments

Comments

@luke88jones
Copy link

Could we add an example of creating spans around a custom process? I think it would be good to demonstrate adding information to processes which aren't covered by instrumentation modules, but the main point of interest I would have here is obtaining the tracer outside of the file it is initialised in. Should Fastify be decorated with the tracer, should it be imported or should we use getTracer() to retrieve it?

@conradthegray
Copy link
Contributor

@luke88jones there is a dummy example just to check how (and if) the custom spans work, both on backend https://github.com/nearform/otlp-blueprint/blob/main/pkg-svcs/backend/lib/server.js#L14 and on frontend https://github.com/nearform/otlp-blueprint/blob/main/pkg-svcs/frontend/src/main.jsx#L17

No analysis on which approach to take to inject tracers into Fastify has been made at this point.

@luke88jones
Copy link
Author

luke88jones commented May 26, 2022

Thank you, I think I was concentrating more on an example away from the initial tracer initialisation as I'm interested in the injection approach the most

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

2 participants