Skip to content

Make BugsnagNetworkRequestPlugin more useful, especially for GraphQL APIs #1275

Open
@gonzalonunez

Description

@gonzalonunez

Description

I'm curious if there is any interest in increasing the general utility of the BugsnagNetworkRequestPlugin, especially for GraphQL APIs. What if, at the very least, the request and response bodies were sent over to Bugsnag?

By default, the URLRequests sent by GraphQL APIs don't end up providing very useful information when they make it over to Bugsnag: every request has the same URL, for example.

Screen Shot 2022-01-10 at 3 50 05 PM

Describe the solution you'd like
Since the BSGURLSessionTracingDelegate has access to the NSHTTPURLResponse when it comes time to log, what if we exposed a way for clients to parse the Data to a String however they'd like (I wouldn't want to assume JSON, but I'm interested in JSON personally) and that was included in the error information that gets sent up to Bugsnag?

Describe alternatives you've considered
I'm aware of the ability to make some changes here server-side, but I'm mostly interested in having the bodies themselves show up in Bugsnag – regardless of whatever the web can do to change the URLs themselves.

Additional context
This would make the plugin extremely useful for me, and I would prefer a built-in approach instead of dropping the plugin altogether and adding additional logging myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogWe hope to fix this feature/bug in the futurefeature requestRequest for a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions