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 prompb to have metric metadata and exemplars #3905

Merged
merged 2 commits into from
May 17, 2021
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
5 changes: 3 additions & 2 deletions pkg/receive/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,10 @@ func (h *Handler) receiveHTTP(w http.ResponseWriter, r *http.Request) {
tenant = h.options.DefaultTenantID
}

// Exit early if the request contained no data.
// TODO(yeya24): handle remote write metadata and exemplars.
// exit early if the request contained no data
if len(wreq.Timeseries) == 0 {
level.Info(h.logger).Log("msg", "empty timeseries from client", "tenant", tenant)
level.Debug(h.logger).Log("msg", "empty timeseries from client", "tenant", tenant)
return
}

Expand Down
132 changes: 98 additions & 34 deletions pkg/store/storepb/prompb/remote.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/store/storepb/prompb/remote.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ option (gogoproto.goproto_sizecache_all) = false;

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

// ReadRequest represents a remote read request.
Expand Down
Loading