-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
Describe the bug
I'm trying to test the OpenTelemetryCollector integration during local dev and I get the following error:
One or more errors occurred. (The endpoint
grpcis not allocated for the resourceopentelemetry-collector.)
I believe this is due to a logging call within WithOpenTelemetryCollectorRouting, if I include an Azure resource in my apphost this endpoint is not yet allocated when this call happens
callback.Logger.LogDebug("Forwarding Telemetry for {name} to the collector on {endpoint}", builder.Resource.Name, endpoint.Url);If I use my own implementation that uses a reference expression, the application launches as expected
var url = endpoint.Property(EndpointProperty.Url);
callback.Logger.LogDebug("Forwarding Telemetry for {name} to the collector on {endpoint}", builder.Resource.Name, ReferenceExpression.Create($"{url}"));Regression
No response
Steps to reproduce
- net9.0
- Aspire AppHost v9.5.2
- Create an AppHost with at least one project resource
- Configure the Open Telemetry Collection with either `WithOpenTelemetryCollection` or `WithAppForwarding`
- Run AppHost
- Exception throws during startup
Expected behavior
The AppHost starts up completely and the project resources send telemetry data to the collector resource
Screenshots
No response
IDE and version
VS 2022
IDE version
17.14.19
Nuget packages
Aspire.Hosting.Azure.AppConfiguration (9.5.2)
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector (9.9.0)
Additional context
No response
Help us help you
No, just wanted to report this
Metadata
Metadata
Assignees
Labels
No labels