New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eventtime vs. Processtime #205

ChristianKniep opened this Issue Mar 11, 2016 · 1 comment


None yet
1 participant

ChristianKniep commented Mar 11, 2016

Hey y'all,

I came across that the GraphiteHandler uses his process time (

datapoint = fmt.Sprintf("%s %f %d\n", datapoint, incomingMetric.Value, time.Now().Unix())

If the sampled metrics are not processed immediately the timestamp send to the backend will be incorrect. Moreso in backends which support fine grained resolution (influxdb supports microseconds).

To tackle this I added a field MetricTime to the metric.Metric struct

type Metric struct {
    Name       string            `json:"name"`
    MetricType string            `json:"type"`
    Value      float64           `json:"value"`
    Dimensions map[string]string `json:"dimensions"`
    MetricTime time.Time         `json:"time"`

And let the graphite handler use this timestamp.

datapoint = fmt.Sprintf("%s %f %s\n", datapoint, incomingMetric.Value, incomingMetric.MetricTime)

This comment has been minimized.

Show comment
Hide comment

ChristianKniep May 14, 2016


I will explore this issue by messaging it into a fork of fullerite.


ChristianKniep commented May 14, 2016

I will explore this issue by messaging it into a fork of fullerite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment