mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tracing: add way to configure trace to logs start and end time (#34995)
* Tracing: add way to configure trace to logs start and end time * Use the span's time by default * Update docs * Update time inputs to use strings instead of number * Support negative values as well * Add info about using negative value * Don't round up Loki range * Update docs/sources/datasources/jaeger.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Wording for doc * Round adjusted start and end time Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This commit is contained in:
@@ -184,14 +184,10 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> {
|
||||
this.adjustInterval((options as DataQueryRequest<LokiQuery>).intervalMs || 1000, rangeMs) / 1000;
|
||||
// We want to ceil to 3 decimal places
|
||||
const step = Math.ceil(adjustedInterval * 1000) / 1000;
|
||||
const alignedTimes = {
|
||||
start: startNs - (startNs % 1e9),
|
||||
end: endNs + (1e9 - (endNs % 1e9)),
|
||||
};
|
||||
|
||||
range = {
|
||||
start: alignedTimes.start,
|
||||
end: alignedTimes.end,
|
||||
start: startNs,
|
||||
end: endNs,
|
||||
step,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user