Transition to using connection strings for data ingestion in Application Insights by 31 March 2025

BA 60 Reputation points
2025-03-26T16:15:39.2+00:00

Hello,

We need to migrate to using connection strings for data ingestion in Application Insights and we are unsure of the exact steps to migrate.

Could you please provide guidance on:

  1. The correct process for migrating from Instrumentation Keys to Connection Strings.
  2. Any potential impact or downtime we should be aware of.
  3. Best practices to ensure a smooth transition.

Thank you!

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
{count} votes

Answer accepted by question author
  1. Pranay Reddy Madireddy 6,340 Reputation points Moderator
    2025-03-26T18:19:59.89+00:00

    Hi BA

    To migrate from Instrumentation Keys to Connection Strings in Application Insights. Below is a step-by-step guide to help you complete the migration smoothly:

    1.
    User's image

    https://learn.microsoft.com/en-us/azure/azure-monitor/app/migrate-from-instrumentation-keys-to-connection-strings#migration
    In your Application Insights SDK configuration, replace the instrumentation key with the connection string. verify that only the connection string is used in your configuration, as using both an instrumentation key and a connection string at the same time can cause conflicts and result in telemetry data not appearing as expected.

    2.There should be no significant downtime if the migration is done correctly. The key point is to remove the instrumentation key from your configuration to avoid any conflicts. If you’re using a supported SDK version and follow the migration steps, your telemetry data will continue to flow without interruption.

    3.verify that you are using a supported version of the Application Insights SDK. Older versions might not support connection strings.

    check that the instrumentation key is fully removed from your configuration to prevent any conflicts.

    For better scalability and security, consider passing the connection string using environment variables when deploying your application.

    Before moving to production, test your configuration in a staging environment to ensure that everything is working as expected.

    https://learn.microsoft.com/en-us/azure/azure-monitor/app/connection-strings
    https://learn.microsoft.com/en-us/azure/azure-monitor/app/migrate-from-instrumentation-keys-to-connection-strings#migration

    let us know if any help, we will always help as you needed.!


    If the answer is helpful, please and "Upvote it".

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.