Unable to View Service in Services Tab, Only Sees Logs
TLDR Srikanth is unable to see their service in the services tab and asks for help. Srikanth suggests using OpenTelemetry and provides resources. Srikanth tries suggested changes but still experiences issues.
Jun 07, 2023 (6 months ago)
Srikanth
11:25 AMSrikanth
03:52 PMAl
08:04 PMJun 08, 2023 (6 months ago)
Srikanth
04:21 AMSrikanth
04:35 AMSrikanth
04:42 AMSrikanth
04:51 AMSrikanth
04:52 AMregisterInstrumentations({
instrumentations: [
new WinstonInstrumentation({
enabled: true,
logHook: (_span, record) => {
record['resource.service.name'] = 'test-service';
},
}),
],
});
Srikanth
04:52 AMSrikanth
04:54 AMSrikanth
04:55 AMSrikanth
04:55 AMconst { diag, DiagConsoleLogger, DiagLogLevel } = require('@opentelemetry/api');
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { ConsoleSpanExporter, InMemorySpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');
const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
const { WinstonInstrumentation } = require('@opentelemetry/instrumentation-winston');
const memoryExporter = new InMemorySpanExporter();
const provider = new NodeTracerProvider();
provider.register();
const tracer = provider.getTracer('default');
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
registerInstrumentations({
instrumentations: [
new WinstonInstrumentation({
enabled: true,
logHook: (_span, record) => {
record['resource.service.name'] = 'test-service';
},
}),
],
});
const winston = require('winston');
global.logger = winston.createLogger({
transports: [
new winston.transports.Console(),
],
})
function main() {
tracer.startActiveSpan('main', (span) => {
("Started the span, printing context");
(span.spanContext());
("In main main spanning");
require('./server.js');
});
("Ended span in main");
}
main();
Srikanth
04:55 AMSrikanth
04:55 AMSrikanth
04:56 AMWhat link have you followed?
Srikanth
04:57 AMYou are only enabling the logging. Please register all the instrumentation using auto-instrumentation https://signoz.io/blog/nodejs-opensource-application-monitoring/#set-up-opentelemetry-and-send-data-to-signoz
Srikanth
04:58 AMI'll have a look
Srikanth
05:49 AMSrikanth
05:49 AMconst { diag, DiagConsoleLogger, DiagLogLevel } = require('@opentelemetry/api');
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { ConsoleSpanExporter, InMemorySpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');
const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
const { WinstonInstrumentation } = require('@opentelemetry/instrumentation-winston');
const memoryExporter = new InMemorySpanExporter();
const provider = new NodeTracerProvider();
provider.register(({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'bot-service',
}),
}));
const tracer = provider.getTracer('default');
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
registerInstrumentations({
instrumentations: [getNodeAutoInstrumentations()],
});
const winston = require('winston');
global.logger = winston.createLogger({
transports: [
new winston.transports.Console(),
],
})
function main() {
tracer.startActiveSpan('main', (span) => {
("Started the span, printing context");
(span.spanContext());
("In main main spanning");
require('./server.js');
});
("Ended span in main");
}
main();
Srikanth
05:50 AM{
function_bot | traceId: '805f6f9bd44083e258988819acc9ca40',
function_bot | parentId: 'e886397ea5108622',
function_bot | traceState: undefined,
function_bot | name: 'fs statSync',
function_bot | id: '0eb6f165db3376df',
function_bot | kind: 0,
function_bot | timestamp: 1686203300970000,
function_bot | duration: 25,
function_bot | attributes: {},
function_bot | status: { code: 0 },
function_bot | events: [],
function_bot | links: []
function_bot | }
Srikanth
08:11 AMSrikanth
09:40 AMSrikanth
09:40 AMSrikanth
09:41 AMSrikanth
09:41 AMSrikanth
09:50 AMSigNoz Community
Indexed 1023 threads (61% resolved)
Similar Threads
Node Tracing Error & Angular Console Error
Angeles experienced errors in both node tracing and Angular console. Prashant asked for the guide used, while vishal-signoz checked the express and otel versions. Palash was asked to check the angular part.
Troubleshooting Log Parsing Issue in SigNoz
Saad is having issues with large JSON log messages being split into multiple lines by SigNoz. nitya-signoz suggested adjusting `max_log_line` and shared relevant resources, but the issue remains unresolved.
Troubleshooting SigNoz Monitoring for AWS EC2 Docker-Compose Application
dipak has problems with SigNoz integration to monitor containers in an AWS EC2 Docker-Compose application. Prashant suggests updating the dashboard and using different guides for log collection, metrics collection and application instrumentation. Issues are still unresolved.
Exporting OpenTelemetry Data from Pixie to SigNoz on Kubernetes
Nilanjan asks how to export opentelemetry data from Pixie to SigNoz on the same Kubernetes cluster. Srikanth suggests configuring the endpoint of the collector in Pixie, but viewing the data in SigNoz dashboard remains unresolved.
Troubleshooting SigNoz Auto-Instrumentation Configuration
igor is having trouble configuring auto-instrumentation for Java applications using SigNoz, with traces not appearing in the SigNoz UI. Prashant advises to check logs of the otel sidecar, use service name for endpoint, verify supported libraries, and test with telemetrygen. However, the issue still persists.