-
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What is the problem this feature would solve?
Browser applications need to export telemetry data, but the current options have limitations:
-
HTTP/OTLP (
@opentelemetry/exporter-trace-otlp-http)- CORS configuration required on collector
- Each span batch creates a new request (DevTools noise)
- No streaming capability
- Higher overhead for frequent small payloads
-
No official WebSocket exporter exists
- OTEP-0099 notes: "Experimental implementation of OTLP over WebSocket transport has shown that it typically has better performance than plain HTTP"
- Left as "future consideration" due to library availability concerns
- Community solutions are fragmented and minimally maintained
-
Standard OTel BatchSpanProcessor limitations
- Uses
setTimeout/setIntervaland unmanaged promises - Does not participate in Effect's
Scopeor fiber management - No backpressure handling
- Uses
What is the feature you are proposing to solve the problem?
Add a SocketSpanProcessor to @effect/opentelemetry that leverages @effect/platform's abstract Socket interface. This provides Effect-native telemetry export with proper error handling, automatic reconnection, and resource management—working across Browser, Node, Bun, and any platform with a Socket implementation.
What alternatives have you considered?
1. Use HTTP Exporter Only
The existing @opentelemetry/exporter-trace-otlp-http works but:
- CORS configuration is an operational burden
- No streaming means higher latency for real-time use cases
- DevTools network tab becomes noisy
2. Build a Custom Protocol
Could define a minimal "just span data" format but:
- Fragments the ecosystem further
- Loses compatibility with OTLP tooling
- More work for marginal gains
3. Build Outside Effect Ecosystem
Could publish as separate package but:
- Loses Effect integration benefits (typed errors, scheduling, resources)
- Misses opportunity to showcase platform abstractions
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request