Automatic Instrumentation

Learn what transactions are captured after tracing is enabled.

Capturing transactions requires that you first set up performance monitoring if you haven't already.

The http.Client instrumentation, once added the SentryHttpClient and enabled the performance feature, starts a span out of the active span bound to the scope for each HTTP Request. The SDK sets the span operation to http.client and description to request $METHOD $url; for example, GET https://sentry.io.

The span finishes once the request has been executed. The span status depends on either the HTTP Response code or SpanStatus.internalError() if the code does not match any of Sentry's SpanStatus.

When the HTTP request throws an Exception, Sentry's SDK associates this exception to the running span. If you haven't set the SDK to swallow the exception and capture it, the span and SentryEvent will be linked when viewing it on the Issue Details page in sentry.io.

For more information see our SentryHttpClient integration.

The Dio instrumentation starts a span out of the active span bound to the scope for each HTTP request. The SDK sets the span operation to http.client and the description to request $METHOD $url. For example, GET https://sentry.io.

The span finishes once the request has been executed. The span status depends on either the HTTP response code or SpanStatus.internalError() if the code does not match any of Sentry's SpanStatus options.

When the HTTP request throws an Exception, Sentry's SDK associates this exception to the running span. If you haven't set the SDK to swallow the exception and capture it, the span and SentryEvent will be linked when viewing it on the Issue Details page in sentry.io.

Learn more in our Dio integration documentation.

The Sentry-specific file I/O implementation starts a span out of the active span, bound to the scope for each file I/O operation. The SDK sets the span operation to file.copy, file.write, file.delete, file.open, file.read or file.rename, and description to filename (for example, file.txt).

In addition, the span contains other useful information such as file.size (raw number of bytes), file.path (an absolute path to the file), and file.async (true if the called method returns a Future, or false if it's a Sync call) as part of the data payload.

The span finishes once the operation has been executed. The span status is then set to SpanStatus.ok if successful, or SpanStatus.internalError if there was an error.

When the operation throws an Exception, Sentry's SDK associates it with the running span. If you haven't set the SDK to swallow and capture the exception, the span and SentryEvent will be shown as linked on the Issue Details page in sentry.io.

For more information see our file I/O integration.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").