aspire icon indicating copy to clipboard operation
aspire copied to clipboard

Add support for HTTP(S) OTLP endpoint

Open sharpSteff opened this issue 9 months ago • 5 comments

Hi Aspire-Team,

Great work with the Aspire-Dashboard. I'm currently looking for a replacement for current OTLP-Backend (https://github.com/SigNoz/signoz), and Aspire Dashboard seems to be a lightweight sulution.

However we are relying in the HTTP OTLP Receiver (#3688). Therefore i tried my best to add HTTP OTLP endpoint support and it works quite will in our usecase.

With this changes Aspire Dashboard can consume OTLP Grpc and http(s) simultaneously. Due to the http/protobuf I could reuse the existing grpc-otlps models and services

Microsoft Reviewers: Open in CodeFlow

sharpSteff avatar May 16 '24 06:05 sharpSteff

The formatting changes make it really hard to review. I don't know if you can undo those but with a big change like this it really makes the diff bigger than it needs to be.

davidfowl avatar May 16 '24 06:05 davidfowl

The formatting changes make it really hard to review. I don't know if you can undo those but with a big change like this it really makes the diff bigger than it needs to be.

I reverted the format changes. Sorry for that

sharpSteff avatar May 16 '24 07:05 sharpSteff

Are there tests that can be written for this new functionality?

eerhardt avatar May 16 '24 14:05 eerhardt

@eerhardt @drewnoakes

Are there tests that can be written for this new functionality?

I added for all endpoints IntegrationTests in OtlpServiceTests.cs

sharpSteff avatar May 22 '24 11:05 sharpSteff

@JamesNK It's a big honor to receive a review of Newtonsoft.Json's author. Thanks for all your work!

sharpSteff avatar May 23 '24 06:05 sharpSteff

I made a bunch of changes.

  • Locked the endpoint down to Protobuf payloads
  • Make OTLP/gRPC endpoint optional. Either OTLP/gRPC or OTLP/HTTP is required.
  • More tests

TODO: There is still work to get the url flowing from the AppHost to the dashboard. I want to make it so that both endpoints are created if specified in app host launchSettings.json. The gRPC address is priorizited. But if the gRPC address is missing then OTLP/HTTP is used.

JamesNK avatar Jun 19 '24 13:06 JamesNK

I think everything is done and this is mergeable. Looking for reviews and approvals.

A follow-up piece of work is changing the app host templates to include DOTNET_DASHBOARD_OTLP_HTTP_ENDPOINT_URL env var. Will do that in its own PR as I think it merits its own discussion without distraction.

JamesNK avatar Jun 20 '24 04:06 JamesNK

Merged! Thanks for your work on this @sharpSteff.

JamesNK avatar Jun 21 '24 01:06 JamesNK