feat(otel): lab6 export worker slots and process CPU and RSS

This commit is contained in:
Голиков Maximillian Антон
2026-11-22 07:08:47 +03:00
parent f5cc00cd98
commit 7c57c46961
4 changed files with 77 additions and 3 deletions
+3
View File
@@ -106,6 +106,9 @@ func Setup(ctx context.Context, cfg SetupConfig) (*Providers, error) {
otel.SetTracerProvider(tp)
otel.SetMeterProvider(mp)
if err := registerProcessMetrics(mp.Meter("process")); err != nil {
slog.Warn("Не удалось зарегистрировать метрики процесса", "error", err)
}
// Пропагация контекста через W3C Trace Context и Baggage
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(