Skip to content
This repository was archived by the owner on Jul 5, 2020. It is now read-only.
This repository was archived by the owner on Jul 5, 2020. It is now read-only.

ProfileQueryEndpoint is not overridable => application identifiers cannot be resolved #853

@zakimaksyutov

Description

@zakimaksyutov

Description

Application ID resolution feature does not work in our own PPE environment. As a result we cannot use new correlation-based features for monitoring our production.

Repro Steps

  1. Override EndpointAddress to PPE endpoint

Actual Behavior

Notice that application identifiers are still resolved (ProfileQueryEndpoint) against original endpoint. Application Insights doesn't allow to configure this endpoint.

Expected Behavior

Allow applications to configure ProfileQueryEndpoint or construct based on EndpointAddress

Version Info

SDK Version : 2.6-beta2

Code

using System.Net.Http;
using System.Threading;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.Extensibility.Implementation;

namespace OverrideProfileApp
{
    class Program
    {
        public static readonly HttpClient client = new HttpClient();

        static void Main(string[] args)
        {
            TelemetryConfiguration.Active.InstrumentationKey = "11111111-1111-1111-1111-111111111111";
            TelemetryConfiguration.Active.TelemetryChannel.EndpointAddress =
                "https://myingestionpoint.com/v2/track";

            var a = TelemetryModules.Instance;

            var telemetryClient = new TelemetryClient();

            while (true)
            {
                Thread.Sleep(1000);

                using (var operation = telemetryClient.StartOperation<RequestTelemetry>("MyOperation"))
                {
                    client.GetStringAsync("https://bing.com").Wait();
                }
            }
        }
    }
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions