OpenTelemetry Support for .NET Aspire #650

Open
opened 2025-12-29 08:31:49 +01:00 by adam · 2 comments
Owner

Originally created by @NapalmCodes on GitHub (Dec 4, 2024).

Originally assigned to: @StefH on GitHub.

Is your feature request related to a problem? Please describe.
It would be useful when using a WireMock in .NET Aspire for the OTEL data to be populated as expected in the OTEL dashboard. This facilitates troubleshooting and the development process.

Describe the solution you'd like
I would expect to see appropriate headers like traceparent respected and traces, logs, metrics to be pushed to the OTEL collector behind the dashboard.

Describe alternatives you've considered
N/A

Is your feature request supported by WireMock (java version)? Please provide details.
Based on a quick search it appears an extension might be under development: https://github.com/wiremock/wiremock-otel-extension

Additional context
Add any other context or screenshots about the feature request here.

Originally created by @NapalmCodes on GitHub (Dec 4, 2024). Originally assigned to: @StefH on GitHub. **Is your feature request related to a problem? Please describe.** It would be useful when using a WireMock in .NET Aspire for the OTEL data to be populated as expected in the OTEL dashboard. This facilitates troubleshooting and the development process. **Describe the solution you'd like** I would expect to see appropriate headers like `traceparent` respected and traces, logs, metrics to be pushed to the OTEL collector behind the dashboard. **Describe alternatives you've considered** N/A **Is your feature request supported by [WireMock (java version)](https://www.wiremock.org)? Please provide details.** Based on a quick search it appears an extension might be under development: https://github.com/wiremock/wiremock-otel-extension **Additional context** Add any other context or screenshots about the feature request here.
adam added the feature label 2025-12-29 08:31:49 +01:00
Author
Owner

@StefH commented on GitHub (Dec 5, 2024):

@NapalmCodes
Looks like a good suggestion, however can you point me to some documents which describe how to build this?

@StefH commented on GitHub (Dec 5, 2024): @NapalmCodes Looks like a good suggestion, however can you point me to some documents which describe how to build this?
Author
Owner

@NapalmCodes commented on GitHub (Dec 6, 2024):

I think it would be a matter of installing the extension in the WireMock container and pointing it at the OTEL connection. The Aspire IResourceWithEnvironment interface provides access to all the OTEL_* env vars that can be utilized to send the telemetry to. You can see an example ContainerResource here from my KrakenD component. I then just use those env vars to tell my gateway where to send the logs, metrics and traces to (i.e.: the OTEL collector the Aspire Dashboard runs). Does that help @StefH ?

A gap for me is how to install the extension. I haven't worked with the Java wiremock solution directly.

@NapalmCodes commented on GitHub (Dec 6, 2024): I think it would be a matter of installing the extension in the WireMock container and pointing it at the OTEL connection. The Aspire `IResourceWithEnvironment` interface provides access to all the `OTEL_*` env vars that can be utilized to send the telemetry to. You can see an example `ContainerResource` [here](https://github.com/NapalmCodes/Aspire.Hosting.Krakend/blob/90ed63a72998ed79ca5a4d49dd9fc893a55a8fef/NapalmCodes.Aspire.Hosting.Krakend/KrakendResource.cs#L10) from my KrakenD component. I then just use those env vars to tell my gateway where to send the logs, metrics and traces to (i.e.: the OTEL collector the Aspire Dashboard runs). Does that help @StefH ? A gap for me is how to install the extension. I haven't worked with the Java wiremock solution directly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#650