Add obsx library

This commit is contained in:
2026-03-23 01:15:21 +03:00
commit 84413772df
10 changed files with 561 additions and 0 deletions

17
doc.go Normal file
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