Skip to content

Commit

Permalink
fix(pprof): multipart upload pprof format (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolesnikovae authored Sep 9, 2022
1 parent c7e051b commit 47d2bcc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/server/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,16 @@ func (h ingestHandler) ingestInputFromRequest(r *http.Request) (*ingestion.Inges
}

case format == "pprof":
input.Profile = &pprof.RawProfile{RawData: b}
input.Format = ingestion.FormatPprof
input.Profile = &pprof.RawProfile{
RawData: b,
}

case strings.Contains(contentType, "multipart/form-data"):
input.Profile = &pprof.RawProfile{
FormDataContentType: contentType,
RawData: b,
}
input.Format = ingestion.FormatPprof
}

if input.Profile == nil {
Expand Down

0 comments on commit 47d2bcc

Please sign in to comment.