Imported traces from the past are only shown after 15 minutes
I try to import telemetry data recorded with Open Telemetry Collector File Exporter. For import I use the OTLP JSON File Receiver in combination with docker-otel-lgtm.
I ran into the problem that traces with a timestamp from the past are only shown after 15 minutes in Grafana.
How can I make them available immediately in Grafana like traces with datetime now?
Steps to reproduce:
- start https://github.com/grafana/docker-otel-lgtm/blob/main/examples/dotnet/docker-compose.yml
via docker compose up
- send dummy trace with datetime now
`curl -X POST http://localhost:4318/v1/traces \
-H "Content-Type: application/json" \
-d '{
"resourceSpans": [{
"resource": {
"attributes": [{
"key": "service.name",
"value": { "stringValue": "test-service" }
}]
},
"scopeSpans": [{
"scope": { "name": "test-scope" },
"spans": [{
"traceId": "'"$(openssl rand -hex 16)"'",
"spanId": "'"$(openssl rand -hex 8)"'",
"name": "TestSpan",
"kind": 1,
"startTimeUnixNano": "'"$(date +%s%N)"'",
"endTimeUnixNano": "'"$(($(date +%s%N) + 100000000))"'",
"attributes": [{
"key": "custom.tag",
"value": { "stringValue": "trace-test" }
}],
"status": { "code": 1 }
}]
}]
}]
}'`
- send dummy trace with datetime - 6h
`curl -X POST http://localhost:4318/v1/traces \
-H "Content-Type: application/json" \
-d '{
"resourceSpans": [{
"resource": {
"attributes": [{
"key": "service.name",
"value": { "stringValue": "test-service" }
}]
},
"scopeSpans": [{
"scope": { "name": "test-scope" },
"spans": [{
"traceId": "'"$(openssl rand -hex 16)"'",
"spanId": "'"$(openssl rand -hex 8)"'",
"name": "TestSpan",
"kind": 1,
"startTimeUnixNano": "'"$(date -d '6 hours ago' +%s%N)"'",
"endTimeUnixNano": "'"$(($(date -d '6 hours ago' +%s%N) + 100000000))"'",
"attributes": [{
"key": "custom.tag",
"value": { "stringValue": "trace-test" }
}],
"status": { "code": 1 }
}]
}]
}]
}'`
- TraceQL: {}
Time Ragne Last 12h
=> Dummy trace with date time now is show immediately, dummy trace with date time -6h is only returned if query is executed 15 minutes after sending the trace.
How can I fix this problem. Is there a special tempo-config setting for?
0 条评论