Skip to content

Support for OSX unavailable when running with ASP.NET Code 3.x #136

@mirek-rynly

Description

@mirek-rynly

Context

We recently migrated our ASP.NET Core server hosted on Azure App Service from Application Insights SDK v2 to v3. Much like v2, v3 supports OSX out-of-the-box. Unlike v2, however, v3 does not support profiling out-of-the-box, and instead requires utilizing the current package (i.e. Azure.Monitor.OpenTelemetry.Profiler), which unfortunately does not support OSX.

Repro steps: enable the profiler the "Application Insights v3" way and start up your server on OSX.

builder.Services.AddApplicationInsightsTelemetry().AddAzureMonitorProfiler();

Expected behavior: server boots.

Observer behavior: process fails to start with a 134 exit code and the following exception:

Unhandled exception. System.NotSupportedException: Only support WINDOWS and LINUX.
   at Azure.Monitor.OpenTelemetry.Profiler.Core.ServiceCollectionExtensions.AddServiceProfilerCore(IServiceCollection services)
   at Azure.Monitor.OpenTelemetry.Profiler.ServiceCollectionExtensions.ConfigureServices(IServiceCollection services, Action`1 configureServiceProfiler)
   at Azure.Monitor.OpenTelemetry.Profiler.ServiceCollectionExtensions.AddAzureMonitorProfiler(IServiceCollection services, Action`1 configureServiceProfiler)
   at Rynly.Platform.Web.Startup.Program.ConfigureServices(WebApplicationBuilder builder) in /Users/mirek/workspace/rynly/rynly.web/Rynly.Platform.Web/Startup/Program.cs:line 241
   at Rynly.Platform.Web.Startup.Program.Main(String[] args) in /Users/mirek/workspace/rynly/rynly.web/Rynly.Platform.Web/Startup/Program.cs:line 76
   at Rynly.Platform.Web.Startup.Program.<Main>(String[] args)

Notable configuration details: tested on OSX 15.7.4 and library version 1.0.1-beta.2. App server is running on .net10.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions