Skip to content

Instantly share code, notes, and snippets.

@tomwilkie
Created October 11, 2017 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomwilkie/6b8599b022212eb89e32935a30267558 to your computer and use it in GitHub Desktop.
Save tomwilkie/6b8599b022212eb89e32935a30267558 to your computer and use it in GitHub Desktop.
message Metric {
string name
string help
Type type # float64 / int64 / bool / enum
Kind kind # cumulative / gauge / untyped
Structure struct # scalar / historgram / summary
repeated Child children
# Q: list label keys here
}
message Child {
repeated LabelPair labels
int64 timestamp_ms # Q: here?
# One off:
Scalar scalar
Summary summary
Histogram gauge_histogram
# Q: also multiply out each type?
}
message Scalar {
Value value
}
message Summary {
uint64 sample_count
Value sample_sum
repeated Quantile quantile
}
message Quantile {
double quantile
Value value
}
message Histogram {
uint64 sample_count
Value sample_sum
repeated Bucket bucket
}
message Bucket {
uint64 count = 1
Value upper_bound = 2
}
message Value {
double double
int64 int64
bool bool
string enum
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment