SigNoz is an open-source observability platform native to OpenTelemetry with logs, traces and metrics in a single application. An open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool
I have the following scenario I was able to get working in flask environment very quickly but struggling with node.js.
I'm trying to switch out the default name/operations (fs open, middleware - query, fs stat, etc) that my client application is sending with custom attributes.
Good evening,
I have the following scenario I was able to get working in flask environment very quickly but struggling with node.js.
I'm trying to switch out the default name/operations (fs open, middleware - query, fs stat, etc) that my client application is sending with custom attributes.
I have the standard tracer.js file:
'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 exporterOptions = { url: 'http://localhost:4318/v1/traces', };
const traceExporter = new OTLPTraceExporter(exporterOptions); const sdk = new opentelemetry.NodeSDK({ traceExporter, instrumentations: [getNodeAutoInstrumentations()], // highlight-start resource: new Resource({
}), });
sdk.start();
process.on('SIGTERM', () => { sdk .shutdown() .then(() => console.log('Tracing terminated')) .catch((error) => console.log('Error terminating tracing', error)) .finally(() => process.exit(0)); });`
In my component I've tried something like:
const tracer = trace.getTracer('default'); const span = tracer.startSpan('fetch-user-profile', { attributes: { component: 'Profile', operation: 'fetchUserProfile', },
Also have tried the following, which I found in one of your sample applications:
I would expect to see traces like fetchUserProfile, fetchStatus, but instead my dashboard looks like:
Love the product, thank you!