diff --git a/package.json b/package.json index 6949743ac..063112f91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uipath/uipath-typescript", - "version": "1.3.0", + "version": "1.3.1-trace1", "description": "UiPath TypeScript SDK", "license": "MIT", "keywords": [ diff --git a/src/core/http/api-client.ts b/src/core/http/api-client.ts index dac52bac3..34536cf44 100644 --- a/src/core/http/api-client.ts +++ b/src/core/http/api-client.ts @@ -70,8 +70,13 @@ export class ApiClient { if (isFormData) { delete defaultHeaders['Content-Type']; } - const headers = { + + const traceId = crypto.randomUUID().replace(/-/g, ''); + const spanId = traceId.slice(0, 16); + + const headers: Record = { ...defaultHeaders, + 'traceparent': `00-${traceId}-${spanId}-01`, ...options.headers };