Skip to content

Commit

Permalink
use the correct attribute -.-
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaHaddara committed Oct 29, 2024
1 parent 93957de commit 1c26261
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
SEMATTRS_HTTP_STATUS_CODE,
SEMATTRS_HTTP_URL,
SEMATTRS_HTTP_USER_AGENT,
SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH,
SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,
} from '@opentelemetry/semantic-conventions';
import {
addSpanNetworkEvents,
Expand Down Expand Up @@ -495,7 +495,7 @@ export class XMLHttpRequestInstrumentation extends InstrumentationBase<XMLHttpRe
const bodyLength = getXHRBodyLength(body);
if (bodyLength !== undefined) {
currentSpan.setAttribute(
SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH,
SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,
bodyLength
);
}
Expand Down

0 comments on commit 1c26261

Please sign in to comment.