Skip to content

trackRequest messes up the values #1432

Open
@magnusottosson

Description

@magnusottosson

Im tracking a request using this object:

client.trackRequest({
  id: '7d2b68c6-5b3d-479d-92f9-ab680847acfd',
  name: 'GET /',
  duration: 6,
  success: false,
  resultCode: '304',
  url: 'http://localhost:4001/',
  time: 2025-05-29T07:50:13.306Z,
  properties: { }
});

In applications I can then see

[
  {
    "timestamp [UTC]": "29/05/2025, 07:40:27.592",
    "id": "d1eb2f37caf9cd98",
    "source": "",
    "name": "HTTP /",
    "url": "http://localhost:4001/",
    "success": "False",
    "resultCode": 304,
    "duration": 3,
    "performanceBucket": "<250ms",
    "itemType": "request",
    "customDimensions": {
    },
    "customMeasurements": "",
    "operation_Name": "HTTP /",
    "operation_Id": "85935f3dd79a3f319f597b9a70fd4c70",
    "operation_ParentId": "85935f3dd79a3f319f597b9a70fd4c70",
    "operation_SyntheticSource": "",
    "session_Id": "",
    "user_Id": "",
    "user_AuthenticatedId": "",
    "user_AccountId": "",
    "application_Version": "",
    "client_Type": "PC",
    "client_Model": "Other",
    "client_OS": "Darwin 24.5.0",
    "client_IP": "0.0.0.0",
    "client_City": "Vastra Frolunda",
    "client_StateOrProvince": "Vastra Gotalands Lan",
    "client_CountryOrRegion": "Sweden",
    "client_Browser": "Other",
    "cloud_RoleName": "unknown_service:/usr/local/bin/node",
    "cloud_RoleInstance": "ip-10-10-20-113.eu-north-1.compute.internal",
    "appId": "41fb5b12-c879-4541-8b0c-8d4b20129b70",
    "appName": "/subscriptions/69fa19ac-b320-401d-b7fa-6d32dc5ebcb3/resourcegroups/shared/providers/microsoft.insights/components/ai-dev",
    "iKey": "e2b6e88c-5fda-4654-9802-17c5d31d8e14",
    "sdkVersion": "uum_node22:otel1.30.1:dst1.11.0",
    "itemId": "3c50d0ad-3c60-11f0-9a42-000d3a445251",
    "itemCount": 1,
    "_ResourceId": "/subscriptions/69fa19ac-b320-401d-b7fa-6d32dc5ebcb3/resourcegroups/shared/providers/microsoft.insights/components/ai-dev"
  }
]

The name change the http method from GET -> HTTP and the id of the request is lost. Whats going on here?

package version 3.7.0

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions