OTel
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Monitor Blazor WASM Containers w/ OTEL

yniasreynders96
Observer

Blazor WebAssembly (WASM) applications run entirely inside the user’s browser. Because of this, Dynatrace OneAgent cannot instrument them—there’s no server‑side runtime for the agent to attach to. As a result, OpenTelemetry is currently the only practical way to collect observability data from WASM apps. (AKS WASM node-pools troubleshooting - Dynatrace Community)

I found an example OTEL setup for Blazor WASM on the New Relic site: (https://newrelic.com/blog/apm/how-to-observe-your-blazor-webassembly-application-with-opentelemetry-...)

This approach works, but it exposes OTEL tokens in the client‑side code, which we want to avoid if possible.

So my questions are:

  • Is there a recommended or best‑practice way to instrument Blazor WASM with OpenTelemetry without exposing tokens in the browser?

  • Is Dynatrace working on native OneAgent support for WASM workloads?

  • Since we are running Dynatrace Managed, we don’t have a public OTEL ingest endpoint—should we expose one, or is there a better pattern for routing OTEL data securely?

We’re looking for guidance on the safest and most future‑proof way to handle OTEL ingestion for WASM applications in a Dynatrace Managed environment.

1 REPLY 1

sujit_k_singh
Champion

Hi @yniasreynders96 

The recommended pattern is to never send OTLP directly from the browser to Dynatrace. Instead, use a backend proxy/collector pattern:

Blazor WASM (browser) → Your Backend API (token-free) → OTel Collector → Dynatrace


Native OneAgent Support for WASM - No, and it's unlikely to come. OneAgent requires a server-side runtime to attach to (JVM, CLR, Node.js process, etc.). Blazor WASM runs entirely in the browser sandbox — there's no process for OneAgent to hook into. OpenTelemetry is the correct and future-proof approach here.


Since you're on Dynatrace Managed (no public OTLP ingest endpoint), the recommended architecture is:

Blazor WASM → Backend Proxy (no token) → OTel Collector (internal network) → ActiveGate → Dynatrace Managed
Steps:

Deploy an OTel Collector internally (same network as your ActiveGate)
Configure the OTel Collector exporter to send to your ActiveGate's OTLP endpoint (ActiveGate can act as an OTLP ingest point for Managed)
Your Blazor WASM app sends traces to your backend proxy (no tokens exposed)
Backend forwards to the internal OTel Collector
OTel Collector exports to ActiveGate → Dynatrace Managed
You do NOT need to expose a public OTLP endpoint. Keep everything internal behind your backend proxy.

Thanks,

Sujit

Dynatrace Professional Certified

Featured Posts