New Location
The SDK modules have been moved to a separate repository and documentation site.otel4s-sdk Documentation
Visit the dedicated otel4s-sdk documentation for installation, configuration, and usage guides.
Why Use the SDK Backend?
The pure Scala SDK implementation offers several advantages:Cross-Platform Support
- JVM - Full compatibility with Java ecosystem
- Scala Native - Native executables with minimal overhead
- Scala.js - Browser-based and Node.js applications
Pure Scala Implementation
- No Java dependencies required
- Better integration with Scala ecosystem
- Idiomatic Scala APIs
Lightweight
- Minimal dependencies
- Smaller binary size
- Suitable for resource-constrained environments
When to Use Each Backend
Use otel4s-oteljava when:
- Running on the JVM
- Need access to Java instrumentation ecosystem
- Require production-ready, battle-tested implementation
- Want to use the Java Agent for zero-code instrumentation
- Need to integrate with Java libraries
Use otel4s-sdk when:
- Targeting Scala Native or Scala.js
- Want a pure Scala implementation
- Need cross-platform compatibility
- Building lightweight services
- Willing to work with experimental features
Migration Path
The otel4s API remains consistent across backends, making it straightforward to switch:Feature Comparison
| Feature | otel4s-oteljava | otel4s-sdk |
|---|---|---|
| Platforms | JVM only | JVM, Native, Scala.js |
| Stability | Production-ready | Experimental |
| Java Interop | Full support | Limited |
| Java Agent | Supported | Not supported |
| Dependencies | OpenTelemetry Java | Pure Scala |
| Ecosystem | Java instrumentation | Scala-native |
| Binary Size | Larger | Smaller |
| Performance | Highly optimized | Good |
Getting Started with SDK
For detailed documentation on using the SDK backend, visit:SDK Overview
Installation and basic usage
SDK Configuration
Configure exporters and processors
Tracing
Implement distributed tracing
Metrics
Collect and export metrics
Platform-Specific Guides
Scala Native
The SDK enables OpenTelemetry for native executables:- Minimal runtime overhead
- Fast startup times
- Small binary size
- Suitable for CLI tools and microservices
Scala.js
Run OpenTelemetry in the browser or Node.js:- Frontend observability
- Full-stack tracing
- Browser performance monitoring
- Node.js backend services
Community and Support
The SDK backend is actively developed by the Typelevel community:- GitHub Repository
- Documentation
- Discord - #otel4s channel
Next Steps
Visit SDK Documentation
Explore the full SDK documentation
OTel Java Backend
Learn about the JVM-focused backend