Authentifizierung mit Azure Monitor Opentelemetry mithilfe von Managed Identity (Entra ID)C#

Ein Treffpunkt für C#-Programmierer
Anonymous
 Authentifizierung mit Azure Monitor Opentelemetry mithilfe von Managed Identity (Entra ID)

Post by Anonymous »

Nach Microsoft-Dokumenten konfigurieren und aktivieren Sie die Microsoft-Entra-ID-Basis-Authentifizierung in der Azure Monitor Opentelemetry-Distribution wie folgt: < /p>
// Create a new ASP.NET Core web application builder.
var builder = WebApplication.CreateBuilder(args);

// Add the OpenTelemetry telemetry service to the application.
// This service will collect and send telemetry data to Azure Monitor.
builder.Services.AddOpenTelemetry().UseAzureMonitor(options => {
// Set the Azure Monitor credential to the DefaultAzureCredential.
// This credential will use the Azure identity of the current user or
// the service principal that the application is running as to authenticate
// to Azure Monitor.
options.Credential = new DefaultAzureCredential();
});

// Build the ASP.NET Core web application.
var app = builder.Build();

// Start the ASP.NET Core web application.
app.Run();
< /code>
  • Findet Azure selbst heraus, welche Anwendungseinblicke Ressource zu schreiben sollen? zu?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post