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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting metrics to Apollo GraphOS Studio #3022

Open
enisdenjo opened this issue Sep 27, 2023 · 2 comments
Open

Reporting metrics to Apollo GraphOS Studio #3022

enisdenjo opened this issue Sep 27, 2023 · 2 comments
Assignees

Comments

@enisdenjo
Copy link
Collaborator

No description provided.

@bitabs
Copy link

bitabs commented Nov 6, 2023

Is there a workaround for the time being? I need to inject the API keys as headers for the apollo graphql server

@enisdenjo enisdenjo assigned EmrysMyrddin and unassigned enisdenjo Nov 9, 2023
This was referenced May 7, 2024
@EmrysMyrddin
Copy link
Collaborator

EmrysMyrddin commented May 27, 2024

Apollo made a partial documentation to explain how reporting works: https://www.apollographql.com/docs/graphos/metrics/sending-operation-metrics#from-a-third-party-server-advanced

The reference implementation for typescript can be found here: https://github.com/apollographql/apollo-server/tree/main/packages/server/src/plugin/usageReporting

The specific function that handles sending batches of traces can be found here: https://github.com/apollographql/apollo-server/blob/268687db591fed8293eeded1546ae2f8e6f2b6a7/packages/server/src/plugin/usageReporting/plugin.ts#L267

The entire repository is under MIT license, so we should be able to reuse some of it's code (some part are not trivial, like the operationId computation).

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

No branches or pull requests

3 participants