Rumbler Soppa
02/15/2023, 2:32 PMSrikanth Chekuri
02/15/2023, 3:24 PMget the data correctly, but nothing is found in the service panel, In Dashboards there is the service of my application, unfortunately I cannot capture anything related to CPU Memory.This part is not clear. Can you share what the issues is? Are you not seeing any applications in the Services tab on the left menu but you are seeing the data in Traces tab?
Rumbler Soppa
02/15/2023, 3:28 PMSrikanth Chekuri
02/15/2023, 3:30 PMI don’t see my service in the services tabIs it all services or only a few services that do not show up in Services tab?
I don’t get metrics from the host where the application runs.How is the collection done and sent to SigNoz?
Rumbler Soppa
02/15/2023, 3:32 PM// tracing.js
'use strict'
const process = require('process');
const opentelemetry = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { diag, DiagConsoleLogger, DiagLogLevel } = require('@opentelemetry/api');
const init = (serviceName, environment) => {
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
const exporterOptions = {
url: '<http://172.31.1.52:4318/v1/traces>',
}
const traceExporter = new OTLPTraceExporter(exporterOptions);
const sdk = new opentelemetry.NodeSDK({
traceExporter,
instrumentations: [getNodeAutoInstrumentations()],
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: serviceName,
[SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: environment
})
});
// initialize the SDK and register with the OpenTelemetry API
// this enables the API to record telemetry
sdk.start()
.then(() => console.log('Tracing initialized'))
.catch((error) => console.log('Error initializing tracing', error));
// gracefully shut down the SDK on process exit
process.on('SIGTERM', () => {
sdk.shutdown()
.then(() => console.log('Tracing terminated'))
.catch((error) => console.log('Error terminating tracing', error))
.finally(() => process.exit(0));
});
}
module.exports = {
init: init,
}
// index.js
const { init } = require('./tracing')
init('show-ip', 'production')
const app = require('./app.js');
const PORT = process.env.PORT || 8080;
app.listen(PORT, () =>
console.log(`nodejs-eventarc-pubsub listening on port ${PORT}`)
);
Recording is off, propagating context in a non-recording span
Srikanth Chekuri
02/16/2023, 9:12 AMRumbler Soppa
02/16/2023, 4:02 PMSrikanth Chekuri
02/16/2023, 4:16 PMRumbler Soppa
02/16/2023, 7:36 PM