Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Receiving OTLP/JSON (over HTTP) in the Aspire Dashboard #6947

Open
1 task done
Grunet opened this issue Dec 15, 2024 · 0 comments
Open
1 task done

Support Receiving OTLP/JSON (over HTTP) in the Aspire Dashboard #6947

Grunet opened this issue Dec 15, 2024 · 0 comments
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-telemetry untriaged New issue has not been triaged

Comments

@Grunet
Copy link

Grunet commented Dec 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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

I was trying to use the Aspire Dashboard locally to visualize traces coming out of a Cloudflare Worker (an alternative JS server runtime), but it wasn't working as I eventually realized for 2 reasons

  1. The Cloudflare Worker-specific OTEL SDK only exports OTLP in JSON form (over HTTP).

gRPC isn't supported at all from Cloudflare Workers afaik (since they're more browser-like than Node.js-like in this regard I think) and there's an existing issue for HTTP/protobuf support (evanderkoogh/otel-cf-workers#68)

  1. The Aspire Dashboard doesn't support ingesting OTLP/JSON (as this comment I found seems to allude to Add support for http OTLP endpoint in the dashboard #3688 (comment))

I'm assuming this is basically a non-issue for anyone in this kind of situation since you can just run an OTEL collector in the middle and have it translate to gRPC/protobuf that gets sent to the Aspire Dashboard, but I figured I'd just write it up in case anyone hits a similar problem (I don't think I personally would have figured this out alone had I not been a little aware of the whole JSON vs binary stuff)

Describe the solution you'd like

Maybe just document the lack of OTLP/JSON support somewhere? (though I might've missed it when looking through the docs trying to figure this out)

Idk if the actual feature really needs to be implemented or not.

Additional context

Not very Aspire-like as I gather but here's a docker-compose.yaml file and an otel-config.yaml file to do the workaround I mentioned above

services:
  otel-collector:
    image: otel/opentelemetry-collector:0.115.1
    container_name: otel-collector
    ports:
      - "4318:4318" # HTTP receiver
      - "55679:55679" # zPages for troubleshooting
      - "8888:8888" # metrics for troubleshooting
    volumes:
      - ./otel-config.yaml:/etc/otelcol/config.yaml

  aspire-dashboard:
    image: mcr.microsoft.com/dotnet/aspire-dashboard:9.0
    container_name: aspire-dashboard
    ports:
      - "18888:18888" # web UI
      - "18889:18889" # receiver
    environment:
      - DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true 
    depends_on:
      - otel-collector
extensions:
  zpages:

receivers:
  otlp:
    protocols:
      http: # Accept OTLP/JSON over HTTP
        endpoint: 0.0.0.0:4318

processors:
  batch:
    timeout: 5s

exporters:
  # debug:
  otlp:
    endpoint: 'aspire-dashboard:18889' # Send OTLP Protobuf to Aspire Dashboard using gRPC
    tls:
      insecure: true

service:
  extensions: [zpages]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp] # , debug]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]

*I typo-ed the path to the collector config file initially hence all of the extra troubleshooting stuff. None of that is actually needed

@joperezr joperezr added untriaged New issue has not been triaged area-telemetry area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-telemetry untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

2 participants