Hello, can someone please help me? I don’t underst...
# support
p
Hello, can someone please help me? I don’t understand why my current log data only shows for the past week when I set the time range, and not for the last 15 minutes. Also, how can I view metric data in Signoz, which is self-hosted?
n
• You can query metrics in a dashboard panel, we don’t have an independent metrics explorer right now. • By past week time range what is the latest logs with a time you are receiving? it is changing over time ?
p
There are two points: • First, when I send a request to my API, I receive a response, but in Signoz logs, I need to change the time range in the top right from "Last 5 minutes" to, for example, "Last 6 hours" to see the logs. • Second, I am also receiving metrics data with a delay of a few minutes, and I can view it. I’m not sure how or where in the Linux system I can change this to receive the data in real time!
Additionally, in my project, I am sending data to Signoz in this way. Is this correct?
Copy code
builder.Services.
AddOpenTelemetry()
      .ConfigureResource(resource =>
      {
        resource
          .AddService(serviceName)
          .AddAttributes(new[]
          {
            new KeyValuePair<string, object>("service.version",
              Assembly.GetExecutingAssembly().GetName().Version!.ToString())
          });
      })
      .WithTracing(tracing =>
        tracing
          .AddAspNetCoreInstrumentation()
          .AddGrpcClientInstrumentation()
          .AddHttpClientInstrumentation()
          .AddNpgsql()
          .AddSource(RabbitMqDiagnostics.ActivitySourceName)
          .AddRedisInstrumentation()
          .AddOtlpExporter(options =>
            options.Endpoint = otlpEndpoint)
      )
      .WithMetrics(metrics =>
        metrics
          .AddAspNetCoreInstrumentation()
          .AddHttpClientInstrumentation()
          .AddMeter("Microsoft.AspNetCore.Hosting")
          .AddMeter("Microsoft.AspNetCore.Server.Kestrel")
          .AddMeter(ApplicationDiagnostics.Meter.Name)
          .AddConsoleExporter()
          .AddPrometheusExporter()
          .AddOtlpExporter(options =>
            options.Endpoint = otlpEndpoint)
      )
      .WithLogging(
        logging =>
          logging
            .AddOtlpExporter(
              options =>
                options.Endpoint = otlpEndpoint),
        options =>
        {
          options.IncludeFormattedMessage = true;
          options.IncludeScopes = true;
          options.ParseStateValues = true;
        }
      );
n
I don’t have much knowledge of dot net. But I did try the serilog otel exporter and it worked pretty well for logs https://github.com/serilog/serilog-sinks-opentelemetry