Hello. I'm working on sending traces from a Nextjs app, and if I use the console exporter, I can see...
m

Marc Trepanier

over 1 year ago
Hello. I'm working on sending traces from a Nextjs app, and if I use the console exporter, I can see that there are traces being created. When I then switch to the OTLPTraceExporter, I'm getting the following error in my logs:
{"stack":"Error: connect ECONNREFUSED 127.0.0.1:4318\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)\n    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)","message":"connect ECONNREFUSED 127.0.0.1:4318","errno":"-61","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":"4318","name":"Error"}
My instrumentation file: (Note access token has been redacted)
"use strict";

import { NodeSDK } from "@opentelemetry/sdk-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
import { Resource } from "@opentelemetry/resources";
import { SEMRESATTRS_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node";
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";

diag.setLogger(new DiagConsoleLogger(), <http://DiagLogLevel.INFO|DiagLogLevel.INFO>);

// configure the SDK to export telemetry data to the console
// enable all auto-instrumentations from the meta package
const exporterOptions = {
  url: "<https://ingest.eu.signoz.cloud:443/v1/traces>", // use your own data region or use localhost:8080 for self-hosted
  headers: { "signoz-access-token": "your-access-token" }, // Use if you are using SigNoz Cloud
};
const traceExporter = new OTLPTraceExporter(exporterOptions);
const sdk = new NodeSDK({
  resource: new Resource({
    [SEMRESATTRS_SERVICE_NAME]: `LEO-${process.env.APP_ENV}`,
  }),
  serviceName: `LEO-${process.env.APP_ENV}`,
  traceExporter,
  instrumentations: [getNodeAutoInstrumentations()],
  spanProcessors: [new SimpleSpanProcessor(new OTLPTraceExporter())],
});

// initialize the SDK and register with the OpenTelemetry API
// this enables the API to record telemetry
sdk.start();

// 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));
});
Hi Team, I've done a fresh setup of SigNoz with clickhouse on EKS with 2 shards and 2 replicas (<htt...
d

Divyansh Sharma

8 months ago
Hi Team, I've done a fresh setup of SigNoz with clickhouse on EKS with 2 shards and 2 replicas (https://signoz.io/docs/operate/clickhouse/distributed-clickhouse/#kubernetes-installation), Now, whenever I do a helm upgrade, the signoz-schema-migrator-sync job runs and fails few times due to table not found errors then automatically succeeds.
Error: code: 60, message: There was an error on [chi-signoz-clickhouse-cluster-1-1:9000]: Code: 60. DB::Exception: Could not find table: time_series_v4. (UNKNOWN_TABLE) (version 24.1.2.5 (official build))
In clickhouse logs as well I see missing table errors. error logs of chi-signoz-clickhouse-cluster-0-0-0:
"message":"Code: 60. DB::Exception: Received from chi-signoz-clickhouse-cluster-1-1:9000. DB::Exception: Table signoz_metrics.samples_v4 does not exist.
"message":"Code: 60. DB::Exception: Received from chi-signoz-clickhouse-cluster-1-1:9000. DB::Exception: Table signoz_metrics.samples_v2 does not exist.
Then while setting the retention on UI, it just gets stuck and in the logs of the query service I see it is not able to do GetTTL from clickhouse:
"msg":"http: panic serving 10.10.249.136:55804: runtime error: invalid memory address or nil pointer dereference\ngoroutine 684 [running]:\nnet/http.(*conn).serve.func1()\n\t/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.7.linux-amd64/src/net/http/server.go:1903 +0xbe\npanic({0x22593a0?, 0x4155d20?})\n\t/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.7.linux-amd64/src/runtime/panic.go:770 +0x132\<http://ngo.signoz.io/signoz/pkg/query-service/app/clickhouseReader.(*ClickHouseReader).GetTTL(0xc00011f688|ngo.signoz.io/signoz/pkg/query-service/app/clickhouseReader.(*ClickHouseReader).GetTTL(0xc00011f688>, {0x2f132b8, 0xc000d074a0}
I cleared the SQLite db table as well, but it is still stuck. (https://signoz.io/docs/faqs/troubleshooting/#i-am-trying-to-change-the-retention-period-of-traces-but-the-process-gets-stuck-everytime) Am I missing something wrt to the db schemas? Is anyone able to make it work with the latest helm chart appVersion=0.73.0?
Hi, I’m migrating from an old signoz version to the latest one, I have this issue: ``` ✘ Container o...
r

Romario Lopez C

11 months ago
Hi, I’m migrating from an old signoz version to the latest one, I have this issue:
✘ Container otel-migrator-sync  service "otel-collector-migrator-sync" didn't complete successfully: exit 1                                                                                                               0.0s
I saw the same issue in github here. I tried to delete the
data/clickhouse/
contents with which returns:
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/.gitkeep': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/user_scripts': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/tmp': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/user_files': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/format_schemas': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/preprocessed_configs': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/uuid': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/flags': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/dictionaries_lib': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/data': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/metadata': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/metadata_dropped': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/rocksdb': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/access': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/store': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/user_defined': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/named_collections': Permission denied
rm: cannot remove 'docker/clickhouse-setup/data/clickhouse/status': Permission denied
Has someone had this issue?