Fix trace wrapper to catch the correct file name and line number (#8760)

Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
dragondriver 2021-09-28 22:14:03 +08:00 committed by GitHub
parent 38a94a104d
commit 803d9ae8ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,7 +108,7 @@ func StartSpanFromContextWithSkip(ctx context.Context, skip int, opts ...opentra
// StartSpanFromContextWithOperationName starts a opentracing span with specific operation name.
// And will log print the current call line number and file name.
func StartSpanFromContextWithOperationName(ctx context.Context, operationName string, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context) {
return StartSpanFromContextWithOperationNameWithSkip(ctx, operationName, 2, opts...)
return StartSpanFromContextWithOperationNameWithSkip(ctx, operationName, 3, opts...)
}
// StartSpanFromContextWithOperationNameWithSkip starts a opentracing span with specific operation name.