Skip to content

Commit

Permalink
Merge branch 'main' into detected-fields-data
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney authored Apr 1, 2024
2 parents 94eb466 + 018856c commit a8fa61a
Show file tree
Hide file tree
Showing 4 changed files with 362 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkg/loghttp/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,29 @@ func ParseLabelQuery(r *http.Request) (*logproto.LabelRequest, error) {
return req, nil
}

func ParseDetectedLabelsQuery(r *http.Request) (*logproto.DetectedLabelsRequest, error) {
start, end, err := bounds(r)
if err != nil {
return nil, err
}

return &logproto.DetectedLabelsRequest{
Start: &start,
End: &end,
Query: query(r),
}, nil
}

func ParseDetectedFieldsQuery(r *http.Request) (*logproto.DetectedFieldsRequest, error) {
req := &logproto.DetectedFieldsRequest{}

start, end, err := bounds(r)
if err != nil {
return nil, err
}
req.Start = &start
req.End = &end

req.Query = query(r)
return req, nil
}
306 changes: 306 additions & 0 deletions pkg/logproto/logproto.pb.go

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

Loading

0 comments on commit a8fa61a

Please sign in to comment.