Add obsx library

This commit is contained in:
dev committed 2026-03-23 01:16:18 +03:00
commit 84413772df
10 files changed
+561

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
// Package obsx provides observability setup for the platform: metrics (Prometheus)
// and tracing (OpenTelemetry).
//
// # Quick Start
//
// // Tracing
// shutdown, err := obsx.SetupTracer(ctx, obsx.TracerConfig{
// ServiceName: "my-service",
// Endpoint: "localhost:4317",
// })
// defer shutdown(ctx)
//
// // Metrics
// metrics := obsx.NewMetrics(obsx.MetricsConfig{Namespace: "myapp"})
// reqCounter := metrics.Counter("requests_total", "Total requests", "method", "status")
// http.Handle("/metrics", metrics.Handler())
package obsx