https://signoz.io logo
#support
Title
# support
r

Rumbler Soppa

02/15/2023, 2:32 PM
Hello team, I have Signoz installed in a vm on google cloud and a node application on Cloud Run [Second generation] , both services are on the same VPS. I manage to capture the metrics, I get 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. I'm happy to provide more information if needed. Signoz Version: v0.16.1
s

Srikanth Chekuri

02/15/2023, 3:24 PM
get 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?
r

Rumbler Soppa

02/15/2023, 3:28 PM
Exactly, this is my problem, I don't see my service in the services tab, and I don't get metrics from the host where the application runs. I suspect Google is blocking something.
s

Srikanth Chekuri

02/15/2023, 3:30 PM
I don’t see my service in the services tab
Is 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?
r

Rumbler Soppa

02/15/2023, 3:32 PM
No services appear in the services tab.
The collection follows according to the documents for java script.
Copy code
// 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,
}
Copy code
// 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}`)
);
Basically this.
I enabled Debug to see if I could get something. I have many exits like this:
Copy code
Recording is off, propagating context in a non-recording span
s

Srikanth Chekuri

02/16/2023, 9:12 AM
This example doesn’t collect the CPU or Memory. This is only enabling the tracing. You need to configure the metrics SDK for system metrics. Do you see your SDK initialisation messages? that doesn’t seem to be working.
r

Rumbler Soppa

02/16/2023, 4:02 PM
Yes, I see the message that initializes the SDK.
s

Srikanth Chekuri

02/16/2023, 4:16 PM
The auto instrumentation works by patching the libraries. My guess is modules have already been required prior. Are you sure tracing code the very first thing that run in your setup?
r

Rumbler Soppa

02/16/2023, 7:36 PM
I do, as you can see in the index.js above.
7 Views