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
apollo-server-core
v2.24 breaks Apollo Studio data reporting
#5205
Comments
Thanks, I'll take a look soon. For what it's worth — the studio usage reporting ingress happily accepts traces and stats from all users, and combines them all into stats. ie, you can send traces to a free graph and it should affect the stats (that's the only way it worked before 2.24!). So the issue isn't exactly what you think it is (Studio completely ignoring data sent as traces). |
Awesome, thanks. And yes indeed, a lot of this is speculation on my part so may have missed the mark. Note though, I was able to get 2.24 working with Studio by digging into |
Thanks @molomby. This is a problem inside Studio's servers. We'll get it fixed within the hour. https://status.apollographql.com/incidents/8h2h9kcyty7b This problem affects all graphs but affects free graphs more. Basically, if any individual message has only stats and no traces, we're throwing it out. Should have set off our monitoring but didn't for technical reasons. The fix is entirely in Studio's servers. |
I think this is fixed. Can you check? No code change needed on your end. |
The changes made in #4142 (released in v2.24) have broke the data reporting needed by Apollo Studio. Downgrading our app to use v2.23 of
apollo-server-core
,apollo-server-express
andapollo-server-micro
restored the correct behaviour.I suspect only the Studio free tier is affected but haven't access to a paid account to confirm.
Expected Behaviour
Stats on operations performed against the GraphQL endpoint are sent to Apollo Studio.
Observed Behaviour
The behaviour we're seeing on 2.24 is, when the app starts up, we get an initial burst of data sent though then nothing until the next restart. The initial "burst" updates the schema (stored by Studio) and includes stats for several requests. It leave us with graphs that look like this...
Speculation
If I'm understanding the code here, when the app starts up Server waits up to
initialDelayMaxMs
before reporting to Studio. In addition to the data sent, this initial report also returns data to the app which is used to configure future reports. Specifically, thetracesIgnored
flag informs the app whether trace data is worth sending, based on the subscription level of the Studio org. in v2.24 this flag is used to set the internalgraphMightSupportTraces
var. However, somewhere in the reporting code, the meaning of this var is flipped. WhengraphMightSupportTraces
is false, only trace data is sent.At least that's what I think is happening. It certainly explains the behaviour we're observing – we get the first batch of stats data, included in that initial request, then only trace data which is ignored by Studio when the org is on the free tier.
Reproduction
You can seemingly reproduce this with any Apollo Server app. I've used the "Getting Started" example:
Generate some traffic:
Let it run for a few minutes. Studio will report the initial burst of traffic followed by silence:
The fix, revert to
apollo-server-core@2.23.0
:Then generate some traffic again, as above, let it run for a few minutes and you'll get a much healthier graph:
The text was updated successfully, but these errors were encountered: