Issues with Custom Metrics Display in Signoz Dashboard
TLDR Deep had a problem displaying custom metrics on the signoz dashboard. Srikanth advised setting up a metric exporter pipeline for otlp/stdout, which resolved the issue.
Aug 17, 2023 (3 months ago)
Deep
04:46 AMI am trying to send custom metrics using otel. But I am unable to see them on the signoz dashboard. Do we have to do any configuration for custom metrics
vishal-signoz
05:22 AMDeep
06:13 AMmeter:=otel.Meter("queue")
counter,err:=meter.Int64Counter("adduser")
if err!=nil{
return
}
counter.Add(c.Request.Context(),1)
sample code
Srikanth
08:57 AMstdout
exporter and confirm if the instrumentation is working?Deep
08:58 AMSrikanth
08:59 AMWhat are these all other things? Please use stdout exporter for metrics and see if the custom metrics is written to console.
Deep
09:00 AMDeep
09:00 AMDeep
06:58 PMDeep
07:03 PMfunc initTracer() func(context.Context) error {
secureOption := otlptracegrpc.WithTLSCredentials(credentials.NewClientTLSFromCert(nil, ""))
if len(insecure) > 0 {
secureOption = otlptracegrpc.WithInsecure()
}
exporter, err := stdouttrace.New(stdouttrace.WithPrettyPrint())
if err != nil {
log.Fatalf("failed to initialize stdout export pipeline: %v", err)
}
tracer, err := otlptrace.New(
context.Background(),
otlptracegrpc.NewClient(
secureOption,
otlptracegrpc.WithEndpoint(collectorURL),
),
)
if err != nil {
log.Fatal(err)
}
resources, err := resource.New(
context.Background(),
resource.WithAttributes(
attribute.String("service.name", serviceName),
attribute.String("library.language", "go"),
),
)
if err != nil {
log.Println("Could not set resources: ", err)
}
otel.SetTracerProvider(
sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(tracer),
sdktrace.WithBatcher(exporter),
sdktrace.WithResource(resources),
),
)
return tracer.Shutdown
}
Aug 18, 2023 (3 months ago)
Deep
04:59 AMSrikanth
06:51 AMAug 21, 2023 (3 months ago)
Deep
05:03 AMSigNoz Community
Indexed 1023 threads (61% resolved)
Similar Threads
Headers in Monitoring HTTP Endpoints & Otel-Collector Error
Rohit asks about providing headers in monitoring HTTP endpoints and reports errors in otel-collector logs. Srikanth mentions headers are unsupported and requires more investigation for errors.
Troubleshooting Signoz Dashboard Not Showing Traces
prasanth encountered issues with Signoz dashboard not displaying traces. Srikanth recommended configuring the `OTEL_EXPORTER_OTLP_ENDPOINT`, but they are still facing issues with the exporter's connection.
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.
Frontend Dashboard Metrics Not Displaying Due to Timezone Issue
James experienced missing metric graphs on their dashboard. Srikanth helped troubleshoot, discovering a timezone discrepancy that caused the issue.
Troubleshooting SigNoz Dashboard Visibility Issue
Naman had an issue with SigNoz not displaying services even though they've enabled it and sent data successfully. Srikanth engaged in investigation and troubleshooting, but the issue remained unresolved.