Skip to main content

Network Instrumentation

Generates: Spans

Automatically captures HTTP requests made via fetch, XMLHttpRequest, and axios — zero code changes required.

Configuration

On by default. To disable:

Pulse.start({ autoDetectNetwork: false });

Capture Headers

Capture specific request or response headers alongside each span:

Pulse.start({
networkHeaders: {
requestHeaders: ['x-request-id', 'authorization'],
responseHeaders: ['x-response-time', 'cache-control'],
},
});

Attributes

pulse.type: network.<status_code> — e.g. network.200, network.404, network.0

AttributeDescriptionExample
http.methodHTTP method"GET", "POST"
http.urlFull request URL"https://api.example.com/users/123"
http.status_codeResponse status200, 404
http.hostHostname"api.example.com"
http.targetPath + query"/users/123"
errortrue on 4xx/5xx or network failuretrue
graphql.operation.nameGraphQL operation name (auto-detected)"GetUser"
graphql.operation.typeGraphQL operation type (auto-detected)"query"
http.request.body.sizeRequest body size in bytes42
http.response.body.sizeResponse body size in bytes2048

GraphQL attributes are added automatically when the URL contains "graphql". Operation name and type are extracted from the request body.

http.request.body.size and http.response.body.size prioritize the Content-Length header. As a fallback, byte counts are calculated for strings, Blob, ArrayBuffer/typed views, and Document.

All requests — including fetch and axios — are intercepted via XMLHttpRequest since that's what they use internally in React Native.

Image & FastImage (OkHttp on Android)

Built-in Image, FastImage, and other native OkHttp traffic bypass the JS layer above. On Android, start from OkHttp Guide to open the network / OkHttp guide (ByteBuddy + artifacts). On iOS, URLSession is instrumented by default — use URLSession to reach the iOS network doc for filters and headers.

Native Side

Use the platform docs for URL filters, header capture, and connectivity-related behavior:

  • Android APIs — Gateway to the Android network (OkHttp/ByteBuddy) guide
  • iOS APIs — Gateway to the iOS network (URLSession) guide