chore: get files from lab6

This commit is contained in:
Голиков Maximillian Антон
2026-11-24 22:32:11 +03:00
parent 20afc2c790
commit 9b88c6f0bd
118 changed files with 9682 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package telemetry
import (
"context"
"go.opentelemetry.io/otel/propagation"
)
// TraceHeaders переносит только W3C Trace Context через границу задания.
func TraceHeaders(ctx context.Context) map[string]string {
headers := propagation.MapCarrier{}
propagation.TraceContext{}.Inject(ctx, headers)
return headers
}
func ExtractTrace(ctx context.Context, headers map[string]string) context.Context {
return propagation.TraceContext{}.Extract(ctx, propagation.MapCarrier(headers))
}