Skip to content

Conversation

@BeegiiK
Copy link
Contributor

@BeegiiK BeegiiK commented Jun 11, 2025

Reason for Change:

Currently, the telemetry handle can only work with instrumentation keys. If we want to use application insights in sovereign clouds, this would simply fail as the logging is shipped to a default ingestion endpoint and the isPublicEnvironment check.

This PR introduces a new telemetry handle method that takes in a connection string, parses it, updates the configuration appropriately and initializes the new handle

Tested manually by updating DNC to use the new telemetry handle and verified that the logs were shipped to Kusto, with the connection string of the test application insights resource

Issue Fixed:

#3730

Requirements:

Notes:

Copilot AI review requested due to automatic review settings June 11, 2025 08:35
@BeegiiK BeegiiK requested a review from a team as a code owner June 11, 2025 08:35
@BeegiiK BeegiiK requested a review from kmurudi June 11, 2025 08:35
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 PR introduces a new telemetry client that supports connection strings for initializing Application Insights telemetry, along with corresponding tests.

  • Updated go.mod to replace the ApplicationInsights-Go dependency.
  • Added a new function, NewAITelemetryWithConnectionString, in telemetrywrapper.go to enable connection string based initialization.
  • Expanded tests in telemetrywrapper_test.go to cover the new connection string initialization.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
go.mod Updated ApplicationInsights-Go dependency replacement.
aitelemetry/telemetrywrapper_test.go Added tests for connection string initialization and error checks.
aitelemetry/telemetrywrapper.go Added NewAITelemetryWithConnectionString function implementation.
Comments suppressed due to low confidence (1)

aitelemetry/telemetrywrapper_test.go:93

  • There is a spelling mistake in the error message; 'intializing' should be changed to 'initializing'.
t.Errorf("Error intializing AI telemetry:%v", err)

@BeegiiK BeegiiK changed the title feat: create new telemetry client with connection strings feat: create new telemetry handle that supports connection strings Jun 11, 2025
@BeegiiK BeegiiK force-pushed the connection-string branch 3 times, most recently from 987145b to fa88a0b Compare June 13, 2025 11:14
@github-actions
Copy link

This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale due to inactivity. label Jun 28, 2025
@BeegiiK BeegiiK force-pushed the connection-string branch from 132ce87 to 88d5717 Compare July 3, 2025 16:13
@github-actions github-actions bot removed the stale Stale due to inactivity. label Jul 4, 2025
@rbtr
Copy link
Collaborator

rbtr commented Jul 8, 2025

@BeegiiK I'm not interested in maintaining a soft AppInsights fork. Have you talked to the owner of the repo to see if they would take this contribution?

@BeegiiK BeegiiK force-pushed the connection-string branch from 3fa5448 to ebec4dd Compare July 15, 2025 15:35
@BeegiiK BeegiiK requested review from a team as code owners July 15, 2025 15:35
@BeegiiK BeegiiK requested a review from ramiro-gamarra July 15, 2025 15:35
@BeegiiK BeegiiK force-pushed the connection-string branch 2 times, most recently from 1879644 to 127c175 Compare July 15, 2025 15:41
@BeegiiK BeegiiK requested a review from rbtr July 16, 2025 10:49
@rbtr
Copy link
Collaborator

rbtr commented Jul 16, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

rbtr
rbtr previously approved these changes Jul 16, 2025
@BeegiiK
Copy link
Contributor Author

BeegiiK commented Jul 17, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BeegiiK
Copy link
Contributor Author

BeegiiK commented Jul 17, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BeegiiK
Copy link
Contributor Author

BeegiiK commented Jul 23, 2025

/azp run NPM Scale Test

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BeegiiK BeegiiK force-pushed the connection-string branch from 850849a to 8ed839f Compare July 23, 2025 17:04
@BeegiiK
Copy link
Contributor Author

BeegiiK commented Jul 23, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BeegiiK BeegiiK requested a review from rbtr July 23, 2025 17:23
rbtr
rbtr previously approved these changes Jul 23, 2025
apontejaj
apontejaj previously approved these changes Jul 23, 2025
@BeegiiK BeegiiK dismissed stale reviews from apontejaj and rbtr via c8facc2 July 23, 2025 17:50
@BeegiiK
Copy link
Contributor Author

BeegiiK commented Jul 23, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BeegiiK BeegiiK force-pushed the connection-string branch from c8facc2 to 16ec957 Compare July 23, 2025 17:55
@BeegiiK
Copy link
Contributor Author

BeegiiK commented Jul 23, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@byte-msft byte-msft self-requested a review July 24, 2025 09:54
@BeegiiK BeegiiK added this pull request to the merge queue Jul 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 24, 2025
@BeegiiK BeegiiK added this pull request to the merge queue Jul 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 24, 2025
@rbtr rbtr added this pull request to the merge queue Jul 24, 2025
Merged via the queue into Azure:master with commit 3e86bca Jul 24, 2025
14 of 15 checks passed
@BeegiiK BeegiiK deleted the connection-string branch July 24, 2025 18:18
NihaNallappagari pushed a commit to NihaNallappagari/azure-container-networking that referenced this pull request Sep 4, 2025
…zure#3729)

* feat: create new telemetry handle with connection strings

* feat: Add application insights source code and remove dependency

* feat: Create connection string helper function and update telemetry handle

* feat: Polishing

* feat: Address PR comments

* feat: Update test telemetry handle initialization

* feat: Re-initialise telemetry handles to fix race conditions during test execution

* feat: revert string formatting changes

* feat: fix lint
sivakami-projects pushed a commit that referenced this pull request Oct 23, 2025
…3729)

* feat: create new telemetry handle with connection strings

* feat: Add application insights source code and remove dependency

* feat: Create connection string helper function and update telemetry handle

* feat: Polishing

* feat: Address PR comments

* feat: Update test telemetry handle initialization

* feat: Re-initialise telemetry handles to fix race conditions during test execution

* feat: revert string formatting changes

* feat: fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

swift Related to SWIFT networking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants