API Reference

HTTP API

Currently there's just one endpoint: POST /ingest. It takes profile data in request body and metadata as query params.

It takes mutliple query parameters:

NameDescriptionNotes
nameApplication Namerequired
fromUNIX time of when the profiling startedrequired
untilUNIX time of when the profiling stoppedrequired
formatformat of the profiling dataoptional (default is folded)
sampleRatesample rate used in Hzoptional (default is 100 Hz)
spyNamename of the spy usedoptional

Request body contains the profiling data. Pyroscope supports different formats, the simplest one is folded. With this format you put one stacktrace per line with a number of samples you've captured for that particular stacktrace, for example:

foo;bar 100
foo;baz 200

Examples

Here's a sample code that uploads a very simple profile to pyroscope:

printf "foo;bar 100\n foo;baz 200" | curl \
-X POST \
--data-binary @- \
'http://localhost:4040/ingest?name=curl-test-app&from=1615709120&until=1615709130'