Oğuzcan Sarıbıyık
12/08/2023, 8:19 AMnestjs microservice
but i have a some issues. If my microservice transporter is GRPC, trace giving me currentSpan. If transporter is TCP, currentSpan is null. Do you have any suggestion?
Calling TCP micro service
let x = await firstValueFrom(
this.serviceClient.send("SERVICE_METHOD", data),
).catch(error => { return { status: 500, success: false, message: null, errorCode: error.stack, data: null, errors: error } });
Get Current Span
import { context, trace } from '@opentelemetry/api';
const currentSpan = trace.getSpan(context.active());