You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TelemetryConfiguration to accept TokenCredential via CredentialEnvelope
AspNetCore configuration - this is omitted because these settings should be configurable from a text config file.
Support AAD in
InMemoryChannel
ServerTelemetryChannel
RetryPolicy via AuthenticationTransmissionPolicy
ExponentialBackoff - this is omitted because not helpful for clientside errors.
QuickPulseServiceClient
Token Caching
Azure.Identity implementation provides caching for most scenarios.
Our own caching - under discussion. Guidance was to rely on Azure.Identity implementation.
Logging
Configuration logging
InMemoryChannel
ServerTelemetryChannel
QuickPulseServiceClient
AuthenticationTransmissionPolicy
collect Azure.Identity logs - this is cut. The decision is to not take on the task of troubleshooting other products.
Changelog
review changelog for completeness
Tests
investigate adding new E2E tests.
Outstanding Todos
Before Stable release, re-review all changes to the PublicApi
After Stable release, update public doc with stable version
Transmission.CreateRequestMessage()
should we block transmission if token is unavailable?
Requirements
AAD should be optional for existing customers.
If AAD is enabled, there will be no backchannels for AAD-less telemetry. Data will be dropped!
Proper authentication will look like an additional token in all request headers.
Services are responsible for validating tokens.
Application Insights SDK will not be responsible for creating tokens. We will rely on existing work from the Azure SDK
Affected Endpoints:
Ingestion
Live Metrics (aka QuickPulse)
Profiler (not in this repo)
Snapshot (not in this repo)
Implementation Details
OTel Exporters must follow the exact scenarios defined by Azure SDK.
That is, client sdks receive the TokenCredential in the constructor.
This approach is influencing our approach for Application Insights.
For Application Insights, we must support all existing customers to the best of our ability.
Here we're making a best-effort to align with the Azure.Core and Azure.Identity libraries.
TokenCredential
We've been advised by the Azure SDK team to use Azure.Core.TokenCredential. Implementations of TokenCredential will handle the lifecycle of a token (creation, renewal, caching, expiration).
TokenCredential defines two methods; GetToken() and GetTokenAsync(). These methods provide the token as a string which will be included in HTTP requests.
IMPORTANT: Because of the framework mismatch, AI SDK cannot take a direct dependency on Azure.Core. Some reflection will need to be used.
TelemetryConfiguration
An instance of TokenCredential needs to be set on the TelemetryConfiguration and propagated to internal classes.
Code Path
We have three classes that communicate with Azure Monitor services (ingestion and live metrics).
Each class will need to acquire the TokenCredential from the TelemetryConfiguration.
To that end, I'm capturing each class's relationship with TelemetryConfiguration and tracing the call stack where these classes make calls their respective service.
TelemetryConfiguration
Note: TelemetrySink ctor will initialize InMemoryChannel w/ TelemetryConfiguration.
varscope="https://storage.azure.com/.default";// example from Blob StoragevartokenRequestContext=new TokenRequestContext(newstring[]{scope});varaccessToken= defaultAzureCredential.GetToken(requestContext: tokenRequestContext,cancellationToken= CancellationToken.None);stringtoken= accessToken.Token;
The text was updated successfully, but these errors were encountered:
Azure Active Directory
Application Insights SDK has a new requirement to support AAD.
Scope of Work
TelemetryConfiguration
to acceptTokenCredential
viaCredentialEnvelope
InMemoryChannel
ServerTelemetryChannel
AuthenticationTransmissionPolicy
QuickPulseServiceClient
InMemoryChannel
ServerTelemetryChannel
QuickPulseServiceClient
AuthenticationTransmissionPolicy
Requirements
Implementation Details
OTel Exporters must follow the exact scenarios defined by Azure SDK.
That is, client sdks receive the TokenCredential in the constructor.
This approach is influencing our approach for Application Insights.
For Application Insights, we must support all existing customers to the best of our ability.
Here we're making a best-effort to align with the Azure.Core and Azure.Identity libraries.
TokenCredential
We've been advised by the Azure SDK team to use
Azure.Core.TokenCredential
. Implementations ofTokenCredential
will handle the lifecycle of a token (creation, renewal, caching, expiration).TokenCredential
defines two methods;GetToken()
andGetTokenAsync()
. These methods provide the token as astring
which will be included in HTTP requests.Supported Frameworks
TokenCredential
DefaultAzureCredential
IMPORTANT: Because of the framework mismatch, AI SDK cannot take a direct dependency on Azure.Core. Some reflection will need to be used.
TelemetryConfiguration
An instance of
TokenCredential
needs to be set on theTelemetryConfiguration
and propagated to internal classes.Code Path
We have three classes that communicate with Azure Monitor services (ingestion and live metrics).
Each class will need to acquire the
TokenCredential
from theTelemetryConfiguration
.To that end, I'm capturing each class's relationship with TelemetryConfiguration and tracing the call stack where these classes make calls their respective service.
TelemetryConfiguration
Note: TelemetrySink ctor will initialize InMemoryChannel w/ TelemetryConfiguration.
InMemoryChannel.Flush()
ServerTelemetryChannel.Initialize(TelemetryConfiguration)
QuickPulseTelemetryModule.Initialize(TelemetryConfiguration)
Note: QuickPulse has two endpoints; Ping and SubmitSamples. Both must support AAD.
Logging
Must be able to investigate configuration scenarios.
Should emit Verbose EventSource logs as the Token is set and propagated to internal classes.
Code Examples
Customers will be responsible for creating their instance of
TokenCredential
The string token can be retrieved as follows:
The text was updated successfully, but these errors were encountered: