(c context.Context, name ...string)
| 43 | } |
| 44 | |
| 45 | func (tracer *otelTracer) Start(c context.Context, name ...string) (context.Context, trace.Span) { |
| 46 | parentSpan := trace.SpanFromContext(c) |
| 47 | ctx, span := parentSpan.TracerProvider().Tracer("").Start(c, getName(name...)) |
| 48 | |
| 49 | span.SetAttributes(attribute.Key("traceID").String(parentSpan.SpanContext().TraceID().String())) |
| 50 | span.SetAttributes(attribute.Key("spanID").String(span.SpanContext().SpanID().String())) |
| 51 | span.SetAttributes(attribute.Key("traceFlags").String(parentSpan.SpanContext().TraceFlags().String())) |
| 52 | |
| 53 | return ctx, span |
| 54 | } |
| 55 | |
| 56 | // Span returns the trace.Span from context.Context |
| 57 | func (tracer *otelTracer) Span(ctx context.Context) trace.Span { |
no test coverage detected