Skip to content

This Repository contains the replication of an Issue in Azure App Service where the App Service stops generating OpenTelemetry traces if CORS is enabled

Notifications You must be signed in to change notification settings

michny/otel-az-app-service-cors-issue-replication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Otel-Azure-PoC

This repository contains the reproduction of an issue identified with Azure App Service and OpenTelemetry when enabling CORS.

Issue

When running an Azure App Service with CORS enabled and an OpenTelemetry enabled .NET 8 application deployed the app will not generate traces to the App Service's Console even when the OpenTelemetry.Exporters.ConsoleExporter is added. If the CORS policy is disabled the traces will be generated as expected.

Steps to reproduce

  1. Clone the repository
  2. Open infra/app-service-with-cors.bicep and modify the resource names to unique values
  3. Create an Azure App Service using the infra/app-service-with-cors.bicep
  4. Open infra/app-service-without-cors.bicep and modify the resource names to unique values
  5. Create an Azure App Service using the infra/app-service-without-cors.bicep
  6. Deploy the Otel-Azure-PoC project to both App Services
  7. Access the App Service without CORS enabled on /WeatherForecast and check the console logs
    1. Expected: The console log shows traces for the http.route WeatherForecast every time the endpoint is accessed
  8. Access the App Service with CORS enabled on /WeatherForecast and check the console logs
    1. Expected: The console log shows no traces for the http.route WeatherForecast

About

This Repository contains the replication of an Issue in Azure App Service where the App Service stops generating OpenTelemetry traces if CORS is enabled

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published