C
CanxJS
v1.6.2
  • Learn
  • Blog
  • Showcase
C
CanxJS

Ultra-fast async MVC backend framework for Bun. Build production-ready APIs with elegance and speed.

Resources

  • Documentation
  • Learn
  • Blog
  • Showcase

Documentation

  • Introduction
  • Installation
  • Core Concepts
  • CLI Commands
  • API Reference

Legal

  • Privacy Policy
  • Terms of Service

© 2026 CanxJS. All rights reserved.

Built with ❤️ for Candra Kirana

  • Aspect-Oriented (AOP)
  • CQRS Architecture
  • GraphQL API
  • Tracing
  • Health Checks
Observability

Tracing

Monitor performance and debug distributed systems with built-in OpenTelemetry support.

Auto-Instrumentation

Automatically traces HTTP requests and DB queries.

Distributed Tracing

Propagate context across microservices.

OpenTelemetry

Native support for OTLP exporters (Jaeger, Zipkin).

Performance

Zero-overhead no-op tracer in production by default.

Setup

Import `TracingModule` to enable observability. Use the `@Trace` decorator to instrument specific methods.

app.ts
1import { TracingModule, Trace } from "canxjs";
2
3@Module({
4 imports: [
5 TracingModule.forRoot({
6 serviceName: "my-service",
7 exporter: "console", // or 'otlp'
8 })
9 ]
10})
11export class AppModule {}
12
13@Injectable()
14export class UserService {
15
16 @Trace("Fetch User") // Auto-instrument this method
17 async findOne(id: string) {
18 // Spans are automatically created
19 return await this.repo.find(id);
20 }
21}

Logging

Tracing works best with structured logging.