-
public class NetworkRequestAttributesA container object for the well-known attributes for network request spans (started with BugsnagPerformance.startNetworkRequestSpan).
-
-
Field Summary
Fields Modifier and Type Field Description public final static NetworkRequestAttributesINSTANCE
-
Method Summary
Modifier and Type Method Description final static UnitsetResponseCode(Span span, Integer statusCode)Set the "http.status_code"attribute on the given Span.final static UnitsetRequestContentLength(Span span, Long contentLength)Set the "http.request_content_length"attribute on the given Span.final static UnitsetUncompressedRequestContentLength(Span span, Long contentLength)Set the "http.request_content_length_uncompressed"attribute on the given Span.final static UnitsetResponseContentLength(Span span, Long contentLength)Set the "http.response_content_length"attribute on the given Span.final static UnitsetUncompressedResponseContentLength(Span span, Long contentLength)Set the "http.response_content_length_uncompressed"attribute on the given Span.final static UnitsetHttpFlavor(Span span, String httpFlavor)Set the "http.flavor"attribute on the given Span.-
-
Method Detail
-
setResponseCode
final static Unit setResponseCode(Span span, Integer statusCode)
Set the
"http.status_code"attribute on the given Span.- Parameters:
span- theSpanmeasuring the HTTP requeststatusCode- the HTTP response code to record on theSpan
-
setRequestContentLength
final static Unit setRequestContentLength(Span span, Long contentLength)
Set the
"http.request_content_length"attribute on the given Span.- Parameters:
span- theSpanmeasuring the HTTP requestcontentLength- the number of bytes in the request body
-
setUncompressedRequestContentLength
final static Unit setUncompressedRequestContentLength(Span span, Long contentLength)
Set the
"http.request_content_length_uncompressed"attribute on the given Span.- Parameters:
span- theSpanmeasuring the HTTP requestcontentLength- the number of bytes in the uncompressed request body
-
setResponseContentLength
final static Unit setResponseContentLength(Span span, Long contentLength)
Set the
"http.response_content_length"attribute on the given Span.- Parameters:
span- theSpanmeasuring the HTTP requestcontentLength- the number of bytes in the response body
-
setUncompressedResponseContentLength
final static Unit setUncompressedResponseContentLength(Span span, Long contentLength)
Set the
"http.response_content_length_uncompressed"attribute on the given Span.- Parameters:
span- theSpanmeasuring the HTTP requestcontentLength- the number of bytes in the uncompressed response body
-
setHttpFlavor
final static Unit setHttpFlavor(Span span, String httpFlavor)
Set the
"http.flavor"attribute on the given Span. Typically one of:"1.0" for HTTP/1.0
"1.1" for HTTP/1.1
"2.0" for HTTP/2.0
- Parameters:
span- theSpanmeasuring the HTTP requesthttpFlavor- the HTTP flavor
-
-
-
-