Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/pattern/chunk/util.go

14 lines
257 B

package chunk
import (
"time"
"github.com/prometheus/common/model"
)
const (
TimeResolution = model.Time(int64(time.Second*10) / 1e6)
MaxChunkTime = 15 * time.Minute
)
func TruncateTimestamp(ts, step model.Time) model.Time { return ts - ts%step }