Skip to content

Commit 358c9c7

Browse files
authored
chore: clarify otlp ingest handler naming (#4535)
1 parent dbd5acf commit 358c9c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/ingester/otlp/ingest_handler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ func NewOTLPIngestHandler(cfg server.Config, svc PushService, l log.Logger, me b
6363
return
6464
}
6565

66-
// Handle HTTP/Protobuf and HTTP/Binary requests
66+
// Handle HTTP/JSON and HTTP/Protobuf requests
6767
contentType := r.Header.Get("Content-Type")
6868
if contentType == "application/json" || contentType == "application/x-protobuf" || contentType == "application/protobuf" {
69-
h.handleHTTPProtobuf(w, r)
69+
h.handleHTTPRequest(w, r)
7070
return
7171
}
7272

@@ -108,7 +108,7 @@ func (h *ingestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
108108
h.handler.ServeHTTP(w, r)
109109
}
110110

111-
func (h *ingestHandler) handleHTTPProtobuf(w http.ResponseWriter, r *http.Request) {
111+
func (h *ingestHandler) handleHTTPRequest(w http.ResponseWriter, r *http.Request) {
112112
defer r.Body.Close()
113113

114114
// Read the request body - we need to read it all for protobuf unmarshaling

0 commit comments

Comments
 (0)