Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Expose new prometheus metric discarded_samples_total #1278

Merged
merged 10 commits into from
Apr 17, 2019

Conversation

fkaleo
Copy link
Contributor

@fkaleo fkaleo commented Apr 11, 2019

The metric takes a reason with values among:

  • sample-out-of-order
  • received-too-late
  • invalid-timestamp
  • invalid-interval
  • invalid-orgID
  • invalid-name
  • invalid-mtype
  • invalid-tag-format
  • unknown-point-id

Fixes #1203

@fkaleo
Copy link
Contributor Author

fkaleo commented Apr 11, 2019

Depends on merging raintank/schema#25

@fkaleo fkaleo force-pushed the expose_discarded_samples_prometheus branch from 2a1b452 to 7fd05c4 Compare April 12, 2019 10:10
@fkaleo fkaleo force-pushed the expose_discarded_samples_prometheus branch from 7a17e61 to fa816aa Compare April 15, 2019 20:10
@fkaleo fkaleo self-assigned this Apr 15, 2019
@fkaleo
Copy link
Contributor Author

fkaleo commented Apr 15, 2019

Manual testing can be performed using:

mdata/init.go Outdated
@@ -15,6 +15,13 @@ import (
log "github.com/sirupsen/logrus"
)

const (
discardReasonLabel = "reason"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems weird to declare this as a global since it only has 1 use, and for org we don't do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed! fixed.

input/input.go Show resolved Hide resolved
@Dieterbe Dieterbe force-pushed the expose_discarded_samples_prometheus branch from 93aabb6 to 2cc492a Compare April 17, 2019 10:15
@Dieterbe
Copy link
Contributor

Note, this PR does not include new-value-for-timestamp. @fkaleo said he'll do that in a followup PR.

Copy link
Contributor

@Dieterbe Dieterbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Dieterbe Dieterbe merged commit 170b49b into master Apr 17, 2019
@Dieterbe Dieterbe deleted the expose_discarded_samples_prometheus branch April 17, 2019 10:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expose discarded samples metrics via prometheus /metrics endpoint
3 participants