Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Use `scribe_cat` for Metro Scribe logs (Scuba: `perfpipe_react_packager`, LogView: `errorlog_metro_bundler_javascript`), as opposed to direct `fetch` to GraphQL. We've [previously seen](https://fb.workplace.com/groups/rn.support/posts/24467303359558282) instances where in poor network conditions or with some misconfiguration, Metro would perform poorly but - for the same reason - we wouldn't log anything to LogView. By delegating logging to `scribe_cat`, which has a long-lived persistent buffer, we should lose fewer messages. This is also much faster, as `scribe_cat` maintains its own persistent local buffer and returns immediately, so we don't have to wait for a series of remote calls to flush Metro's buffer (Metro's scribe volume can be quite large, as each transformed file generates several logs, a startup with prebundling can be many thousands). This was also contributing factor to "Timed out waiting for graceful shutdown ... Telemetry may have been lost". Finally, this removes the need for a hardcoded ID/token. Follows similar changes in D49277801 and D45812150 NB: Categories must still be [allowlisted](https://www.internalfb.com/intern/wiki/Scribe/users/Knowledge_Base/Interacting_with_Scribe_categories/Graph_API/category_access/#common-scenario-1-allow) in GraphQL to make it from a local machine to Scuba. A non-allowlisted category will work from prod, but on corp (backed by GraphQL rather than Thrift) it will be accepted by scribe_cat only to fail unobservably when flushed. Reviewed By: huntie Differential Revision: D63226891 fbshipit-source-id: 44ef6260e8e9ff97c97effd6cdff40f5761ea433
- Loading branch information