Skip to content

[New] Interface for ApplicationId Lookup (IApplicationIdProvider) #739

Closed

Description

Proposing a new Interface for Correlation Application ID resolution in the BaseSDK.

Why:
This came about while working to resolve this issue: microsoft/ApplicationInsights-dotnet-server#853

The current CorrelationIdLookupHelper was not designed with configuring the endpoint in mind.

Additionally, multiple modules have private instances of the CorrelationIdLookupHelper which prevents it from caching lookup results and preventing duplicate requests.

What:
TelemetryConfiguration will get a root level property: ApplicationIdProvider

public IApplicationIdProvider ApplicationIdProvider { get; set; }

The new interface is proposed as such:

public interface IApplicationIdProvider
{
    bool TryGetApplicationId(string instrumentationKey, out string applicationId);
}

Assumptions:

  • An app will only need one provider, not a collection of providers.
  • an ikey(s) will be needed to lookup an app id(s)
  • the provider will take an ikey and resolve an appid and may store that formatted
  • Breeze applicaton id format: "cid-v1:{app id}"

Delivering:

  • the new interface: IApplicationIdProvider
  • new TelemetryConfiguration property ApplicationIdProvider
    • This property will be null by default in the BaseSDK. Users will be able to opt-in.
    • This property will be set to an ApplicationInsights specific implementation when the WebSDK is installed.
  • three implementations:
    • StaticCorrelationIdProvider will allow users to configure a single app id.
    • DictionaryApplicationIdProvider will allow users to configure a collection of ikey/appid pairs
    • ApplicationInsightsApplicationIdPovider is a copy of the CorrelationIdLookupHelper from the WebSDK. This will be our provider that supports our Breeze endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions