Skip to content

Commit

Permalink
set span kind for traceContext and traceContextSync
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeroberts-wk committed Jul 1, 2024
1 parent dc0722c commit 599e525
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/api/open_telemetry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Future<T> traceContext<T>(String name, Future<T> Function(api.Context) fn,
context = api.contextWithSpanContext(context, api.SpanContext.invalid());
}

final span = tracer.startSpan(name, context: context);
final span = tracer.startSpan(name, context: context, kind: spanKind);
context = api.contextWithSpan(context, span);
try {
// TODO: remove this check once `run` exists on context interface
Expand Down Expand Up @@ -140,7 +140,7 @@ R traceContextSync<R>(String name, R Function(api.Context) fn,
context = api.contextWithSpanContext(context, api.SpanContext.invalid());
}

final span = tracer.startSpan(name, context: context);
final span = tracer.startSpan(name, context: context, kind: spanKind);
context = api.contextWithSpan(context, span);
try {
var r;
Expand Down

0 comments on commit 599e525

Please sign in to comment.