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

[Feature Request] Add support to register the OTEL graphQL tracer to a mode. #1126

Open
alexus37 opened this issue Aug 19, 2024 · 8 comments
Labels
keep Ensures stale-bot keeps this issue/PR open

Comments

@alexus37
Copy link

Currently, you can pass different schemas through the config to register the tracer. However, it's not currently feasible to register the tracer to a specific mode. This feature can be very handy if you aim to have a high-performance mode without any tracing and a separate trace mode for troubleshooting. In GraphQL code, this functionality is achieved by using trace_with, where you specify both the tracer module and the mode. For example:

::GraphQL::Schema.trace_with(Tracers::GraphQLTrace, mode: :otel_trace_mode)
@arielvalentin
Copy link
Collaborator

Cc: @rmosolgo

@rmosolgo
Copy link
Contributor

It certainly sounds good to me... the line above is taken straight from the instrumentation's source:

I think it's just a question of interface. Do you want to expose some kind of option that gets threaded through OpenTelementry and eventually passed there? Or, expose the trace module as a public API and invite users to attach it to their schema however they want?

@elenatanasoiu
Copy link
Contributor

elenatanasoiu commented Aug 21, 2024

@alexus37 is on holiday so I can't speak for him but I think we don't need access to the entire trace module API at this point. Just having the option to configure a mode would be great.

@x-eleos
Copy link

x-eleos commented Aug 21, 2024

@alexus37 is on holiday so I can't speak for him but I think we don't need access to the entire trace module API at this point. Just having the option to configure a mode would be great.

I would agree with this too :)

Copy link
Contributor

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

@github-actions github-actions bot added the stale Marks an issue/PR stale label Sep 21, 2024
@kaylareopelle
Copy link
Contributor

@alexus37 - What do you think about @rmosolgo's question above?

#1126 (comment)

@github-actions github-actions bot removed the stale Marks an issue/PR stale label Oct 2, 2024
@alexus37
Copy link
Author

alexus37 commented Oct 2, 2024

Do you want to expose some kind of option that gets threaded through OpenTelementry and eventually passed there?

I believe that if I could pass the mode parameter to take advantage of trace modes, it would definitely resolve my issue.

Copy link
Contributor

github-actions bot commented Nov 2, 2024

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

@github-actions github-actions bot added the stale Marks an issue/PR stale label Nov 2, 2024
@kaylareopelle kaylareopelle added keep Ensures stale-bot keeps this issue/PR open and removed stale Marks an issue/PR stale labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Ensures stale-bot keeps this issue/PR open
Projects
None yet
Development

No branches or pull requests

6 participants