https://signoz.io logo
Title
a

Alex Grönholm

03/24/2023, 9:20 AM
I'm a bit confused about the logs view. When I choose "Last 1 hour", "Last 5 minutes" in the logs view, what does that actually give me? On my installation, choosing either one gives me 3 day old logs. What does it actually filter on?
a

Ankit Nayan

03/24/2023, 10:16 AM
This is not much useful if you have continuous logs coming in. If you specify a filter with a few logs that came the last day only. Such dropdown will be useful.
Moreover, it is more useful when you want to view a custom time range
a

Alex Grönholm

03/24/2023, 10:17 AM
but what field does the filter actually apply to? Intuitively it would filter based on the timestamp.
but clearly it does not since I get logs with timestamps 3 days in the past even when I select 1 hour
a

Ankit Nayan

03/24/2023, 10:17 AM
yes..yes
a

Alex Grönholm

03/24/2023, 10:18 AM
I have a setup where I run vanilla otel-collector-contrib and export logs via OTLP to signoz
a

Ankit Nayan

03/24/2023, 10:18 AM
I didn't get you. You mean you can see logs that happened 3 days back when the selected filter is 1 hour?
a

Alex Grönholm

03/24/2023, 10:19 AM
yes
image.png
a

Ankit Nayan

03/24/2023, 10:19 AM
It's weird. Can you share the complete API request curl from the network tab?
a

Alex Grönholm

03/24/2023, 10:19 AM
sec
I pressed refresh, and now I get nothing again
a

Ankit Nayan

03/24/2023, 10:21 AM
I pressed refresh, and now I get nothing again
I think this is a bug. Can you show request payload when you see last 3 days data?
a

Alex Grönholm

03/24/2023, 10:21 AM
I will try but it's hard to reproduce
I am struggling to get my setup working. I cannot seem to get the logs delivered to signoz reliably, and I can't even debug the problem since there is nothing output to the collector logs (not a signoz problem, but still)
a

Ankit Nayan

03/24/2023, 10:26 AM
you can use logging exporter at signoz to verify logs are being received by signoz https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/loggingexporter#note
a

Alex Grönholm

03/24/2023, 10:31 AM
tried that. I even added an operator
-type: stdout
to the
filelog
receiver, but I still get nothing. I tried this locally and it worked fine.
I am totally at my wit's end trying to get logging to work.
I know you don't have any obligation to help me, as this is not a signoz problem per se
(and even if it was)
ok, it looks like
filelog
receiver isn't seeing any logs
this was a bug in the otelcollector helm chart. I'm going to file PRs to fix that.
for posterity, the problem was that the include patterns started with
/var/log/
when they should've been prefixed with
/hostfs/var/log
as the host file system is mounted at
/hostfs