microsoft / microsoft/aspire

.NET 8.4.1 - ServiceDefault and OpenTelemetry

Open
#19,860 3 comments 0 reactions 0 assignees View on GitHub
area-telemetry needs-area-label triage:bot-seen triage:needs-human
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I would like to include a .NET 8.4.1 framework console project that makes use of the Microsoft.Extensions.Hosting and other packages to run a background service into an aspire solution; at present the .NET 8.4.1 framework loads and runs as expected; however the I'm unable to make use of the ServiceDefaults project and/or setup the OpenTelemetry the following error is shown:

System.NotSupportedException: 'OtlpExportProtocol.Grpc with the default HTTP client factory is not supported on .NET Framework or .NET Standard 2.0.Please switch to OtlpExportProtocol.HttpProtobuf or provide a custom HttpClientFactory.'

### Describe the solution you'd like

add suppport for .NET 4.x projects and/or update the ServiceDefaults template so it may be used by .NET 4.x framework projects.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the error in the .NET Framework console project that uses Microsoft.Extensions.Hosting, the ServiceDefaults project, and OpenTelemetry. Read the ServiceDefaults project and template configuration to determine how the default OTLP protocol is selected. Done means a .NET 4.x framework project can use ServiceDefaults and OpenTelemetry, or the template clearly supports the compatible protocol or custom HTTP client factory.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.