Skip to content
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

update prom remote write for bulk timers #38

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 0 additions & 144 deletions thirdparty/gogoproto/gogo.proto

This file was deleted.

147 changes: 0 additions & 147 deletions thirdparty/prometheus/prompb/io/prometheus/client/metrics.proto

This file was deleted.

9 changes: 3 additions & 6 deletions thirdparty/prometheus/prompb/remote.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@
syntax = "proto3";
package prometheus;

option go_package = "prompb";

import "prometheus/prompb/types.proto";
import "gogoproto/gogo.proto";

message WriteRequest {
repeated prometheus.TimeSeries timeseries = 1 [(gogoproto.nullable) = false];
repeated prometheus.TimeSeries timeseries = 1;
// Cortex uses this field to determine the source of the write request.
// We reserve it to avoid any compatibility issues.
reserved 2;
repeated prometheus.MetricMetadata metadata = 3 [(gogoproto.nullable) = false];
repeated prometheus.MetricMetadata metadata = 3;

// Added as an extension, this field allows us to forward statsd PDUs that fail to parse.
repeated string failthrough_statsd_lines = 17;
Expand Down Expand Up @@ -86,4 +83,4 @@ message ChunkedReadResponse {

// query_index represents an index of the query from ReadRequest.queries these chunks relates to.
int64 query_index = 2;
}
}
29 changes: 15 additions & 14 deletions thirdparty/prometheus/prompb/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
syntax = "proto3";
package prometheus;

option go_package = "prompb";

import "gogoproto/gogo.proto";

message MetricMetadata {
enum MetricType {
UNKNOWN = 0;
Expand All @@ -29,9 +25,12 @@ message MetricMetadata {
INFO = 6;
STATESET = 7;

// added as extensions
// bitdrift extensions
DIRECTGAUGE = 100;
DELTAGAUGE = 101;
TIMER = 102;
BULKTIMER = 103;
DIRECTCOUNTER = 104;
}

// Represents the metric type, these match the set from Prometheus.
Expand All @@ -48,13 +47,15 @@ message Sample {
// conversion from time.Time to Prometheus timestamp.
int64 timestamp = 2;

// added as an extension, sample_rate is a ratio in the range (0,1].
// bitdrift extension: sample_rate is a ratio in the range (0,1].
double sample_rate = 100;
// bitdrift extension: bulk values used for the bulk timer metric type.
repeated double bulk_values = 101;
}

message Exemplar {
// Optional, can be empty.
repeated Label labels = 1 [(gogoproto.nullable) = false];
repeated Label labels = 1;
double value = 2;
// timestamp is in ms format, see model/timestamp/timestamp.go for
// conversion from time.Time to Prometheus timestamp.
Expand All @@ -65,9 +66,9 @@ message Exemplar {
message TimeSeries {
// For a timeseries to be valid, and for the samples and exemplars
// to be ingested by the remote system properly, the labels field is required.
repeated Label labels = 1 [(gogoproto.nullable) = false];
repeated Sample samples = 2 [(gogoproto.nullable) = false];
repeated Exemplar exemplars = 3 [(gogoproto.nullable) = false];
repeated Label labels = 1;
repeated Sample samples = 2;
repeated Exemplar exemplars = 3;
}

message Label {
Expand All @@ -76,7 +77,7 @@ message Label {
}

message Labels {
repeated Label labels = 1 [(gogoproto.nullable) = false];
repeated Label labels = 1;
}

// Matcher specifies a rule, which can match or set of labels or not.
Expand Down Expand Up @@ -120,7 +121,7 @@ message Chunk {
// ChunkedSeries represents single, encoded time series.
message ChunkedSeries {
// Labels should be sorted.
repeated Label labels = 1 [(gogoproto.nullable) = false];
repeated Label labels = 1;
// Chunks will be in start time order and may overlap.
repeated Chunk chunks = 2 [(gogoproto.nullable) = false];
}
repeated Chunk chunks = 2;
}
Loading