CommunityToolkit / CommunityToolkit/Aspire
OpenTelemetryCollector fails to export due to DNS issues
- Dominant language
- C#
- Stars
- 627
- Forks
- 196
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 35
Description
### Describe the bug
The OTel collector provided by CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector fails to export anything back to Aspire because it cannot resolve `aspire.dev.internal` via DNS.
### Regression
_No response_
### Steps to reproduce
* Add the CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector package to an Aspire AppHost project.
* Add the collector to the AppHost using `builder.AddOpenTelemetryCollector("otel-collector").WithConfig("config.yaml");` where config.yaml is [the example configuration](https://github.com/CommunityToolkit/Aspire/blob/main/examples/opentelemetry-collector/CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector.AppHost/config.yaml). I have also tried including `.WithOtlpExporter(OtlpProtocol.Grpc)` and that did not help.
* The collector starts reporting errors:
```
2026-09-01T13:40:49.730Z warn grpc@v1.83.0/resolver_wrapper.go:157 [core] [Channel #1] ccResolverWrapper: reporting error to cc: dns: A record lookup error: lookup aspire.dev.internal on 10.89.1.1:53: dial udp 10.89.1.1:53: i/o timeout {"resource": {"service.instance.id": "fd5d7e94-490d-46e1-853e-d89d458eac81", "service.name": "otelcol-contrib", "service.version": "0.159.0"}, "grpc_log": true}
```
### Expected behavior
The OTel collector is able to collect OpenTelemetry data and forward it to Aspire.
### Screenshots
_No response_
### IDE and version
Other
### IDE version
Visual Studio 2026 v18.9.2
### Nuget packages
```text
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector v13.5.0
```
### Additional context
_No response_
### Help us help you
Yes, but only if others can assist
Contributor guide
Research direction
Start with the CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector package, the AppHost AddOpenTelemetryCollector call, and the example config.yaml linked in the report. Reproduce with package version 13.5.0 and inspect the collector's DNS error for aspire.dev.internal; done means the collector resolves the Aspire endpoint and forwards collected OpenTelemetry data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100