Skip to content

Conversation

@JacksonWeber
Copy link
Contributor

Fixes #1432

@JacksonWeber JacksonWeber requested review from Copilot and hectorhdzg and removed request for hectorhdzg June 19, 2025 03:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request addresses #1432 by preserving custom trace IDs passed to track methods. Key changes include:

  • Adding tests to verify that custom trace IDs are preserved in both trackRequest and trackDependency methods.
  • Updating telemetryClient.ts to conditionally set HTTP attributes and directly assign custom trace IDs to the span context.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
test/unitTests/shim/telemetryClient.tests.ts Added tests confirming custom trace id preservation for requests and dependencies
src/shim/telemetryClient.ts Updated HTTP attribute assignment logic and applied custom trace id on spans
Comments suppressed due to low confidence (1)

src/shim/telemetryClient.ts:176

  • The condition using telemetry.name to decide whether to set the HTTP method attribute is not immediately intuitive. Please consider adding a comment or using a more explicit condition to clarify this behavior.
        if (!telemetry.name) {

@JacksonWeber JacksonWeber requested a review from rads-1996 June 24, 2025 01:43
@JacksonWeber JacksonWeber merged commit 4565c88 into microsoft:main Jun 26, 2025
16 of 20 checks passed
@JacksonWeber JacksonWeber mentioned this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trackRequest messes up the values

2 participants