Dhruv garg
06/03/2024, 2:13 PMDhruv garg
06/03/2024, 2:13 PMDhruv garg
06/03/2024, 2:26 PMDhruv garg
06/03/2024, 2:26 PM{
name: '/v1/sys/health',
context: {
trace_id: '7bba9f33312b3dbb8b2c2c62bb7abe2d',
span_id: '086e83747d0e381e',
},
parent_id: '',
start_time: '2021-10-22 16:04:01.209458162 +0000 UTC',
end_time: '2021-10-22 16:04:01.209514132 +0000 UTC',
status_code: 'STATUS_CODE_OK',
status_message: '',
attributes: {
'net.transport': 'IP.TCP',
'net.peer.ip': '172.17.0.1',
'net.peer.port': '51820',
'net.host.ip': '10.177.2.152',
'net.host.port': '26040',
'http.method': 'GET',
'http.target': '/v1/sys/health',
'http.server_name': 'mortar-gateway',
'http.route': '/v1/sys/health',
'http.user_agent': 'Consul Health Check',
'http.scheme': 'http',
'http.host': '10.177.2.152:26040',
'http.flavor': '1.1',
},
events: [
{
name: 'sad',
message: 'OK',
timestamp: '2021-10-22 16:04:01.209512872 +0000 UTC',
},
],
}
Dhruv garg
06/03/2024, 2:28 PMSrikanth Chekuri
06/03/2024, 4:50 PMDhruv garg
06/04/2024, 8:31 AMcurl -X POST -H "Content-Type: application/json" -d @trace.json -i <http://9.9.9.9:4317/v1/traces>
but getting this error
curl: (1) Received HTTP/0.9 when not allowed
when tried from postman
Parse Error: The server returned a malformed response
Srikanth Chekuri
06/04/2024, 8:41 AMDhruv garg
06/04/2024, 8:47 AMDhruv garg
06/04/2024, 8:47 AMSrikanth Chekuri
06/04/2024, 8:49 AMreceivers:
otlp:
protocols:
grpc:
http:
Dhruv garg
06/04/2024, 8:50 AMPort: otlp 4317/TCP
TargetPort: otlp/TCP
Endpoints: 10.0.139.186:4317
Port: otlp-http 4318/TCP
TargetPort: otlp-http/TCP
Endpoints: 10.0.139.186:4318
I can see these linesDhruv garg
06/04/2024, 8:51 AMDhruv garg
06/04/2024, 8:58 AMSrikanth Chekuri
06/04/2024, 9:00 AMDhruv garg
06/04/2024, 10:12 AMconst span = tracer.startSpan(
req.body.api + '_' + req.body.timezone,
{
startTime: req.body.startTime,
kind: SpanKind.CLIENT,
attributes: {
platform: req.body.platform,
},
},
trace.setSpan(context.active(), ctx.trace),
);
span.setStatus({ code: SpanStatusCode.OK });
span.end(req.body.endTime);
I tried sending using @opentelemetry/api package, but this is not working, am I missing something?
I am using same approach for other traces in codebase, and that is working fineDhruv garg
06/04/2024, 10:50 AMConsoleExporter
I was able to log this
{
traceId: 'b7bbcdb0bb9a834517623a36f39790be',
parentId: undefined,
traceState: undefined,
name: 'trackAsia/Kolkata',
id: 'c113e856aef40ad0',
kind: 2,
timestamp: 1717493453000,
duration: 500000,
attributes: { platform: 4 },
status: { code: 1 },
events: [],
links: []
}
but I am not getting this in signoz dashboard, how can we troubleshoot this @Srikanth Chekuri
this is the code
const frontendTraceProvider = new NodeTracerProvider({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'frontend-nudge',
[SemanticResourceAttributes.SERVICE_VERSION]: '0.1',
}),
});
frontendTraceProvider.addSpanProcessor(
new BatchSpanProcessor(new ConsoleSpanExporter(), {
maxExportBatchSize: 512,
maxQueueSize: 4096,
scheduledDelayMillis: 3000,
exportTimeoutMillis: 30000,
}),
);
const performanceTracer = frontendTraceProvider.getTracer('frontend-performance');
const span = performanceTracer.startSpan(req.body.api + req.body.timezone, {
startTime: req.body.startTime,
kind: SpanKind.CLIENT,
attributes: {
platform: req.body.platform,
},
});
span.setStatus({ code: SpanStatusCode.OK });
span.end(req.body.endTime);
SigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc.
Powered by