mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-18 06:17:56 +00:00
fixup! Add draft of tracing package.
This commit is contained in:
@@ -300,7 +300,13 @@ If you prefer more control over the metrics purging - you can enable `PURGE_METR
|
||||
|
||||
Tracing can be enabled by setting `ENABLE_TRACE` to `true` and providing compatible with OTEL `TRACER_ENDPOINT` value ( default is `localhost:4317` ). From that moment you can include `X-Trace-Span` in your requests to the proxy.
|
||||
|
||||
The value of X-Trace-Span should be in following format !!#TODO!!
|
||||
The value of X-Trace-Span should be in following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
|
||||
}
|
||||
```
|
||||
|
||||
#### Healthcheck
|
||||
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ func TraceContextExtract(ctx context.Context, traceContext map[string]string) co
|
||||
|
||||
func StartSpanFromContext(ctx context.Context, operationName string) (context.Context, oteltrace.Span) {
|
||||
tr := otel.GetTracerProvider().Tracer("")
|
||||
return tr.Start(ctx, operationName, oteltrace.WithSpanKind(oteltrace.SpanKindInternal))
|
||||
return tr.Start(ctx, operationName, oteltrace.WithSpanKind(oteltrace.SpanKindServer))
|
||||
}
|
||||
|
||||
func ContinueSpanFromContext(ctx context.Context, operationName string) (context.Context, oteltrace.Span) {
|
||||
|
||||
Reference in New Issue
Block a user