pyroscope icon indicating copy to clipboard operation
pyroscope copied to clipboard

Add API for adding Annotations on the timeline

Open petethepig opened this issue 2 years ago • 5 comments

We should add ability for users to add annotations via an API.

For example, this is what those look like in grafana:

Screen Shot 2021-12-08 at 5 37 17 PM

  • [ ] We could start by having a simple API for creating these:
# this api is copied from graphite:
#  https://www.hostedgraphite.com/docs/api/annotations-and-events.html#creating-an-annotation-for-the-impatient

curl -X POST http://pyroscope:4040/api/v1/annotations -d "title=new deploy"
  • [ ] then we could add something on the frontend to render these

petethepig avatar Dec 09 '21 01:12 petethepig

@petethepig should we merge this with #97 ?

Rperry2174 avatar Dec 09 '21 01:12 Rperry2174

@Rperry2174 oops, my bad. we could have both I guess, yours could be the next step where a user can add their own annotations, and it can use the same api we implement in this issue.

petethepig avatar Dec 09 '21 02:12 petethepig

hey @petethepig until we get support for sql or something along those lines, should we just store this kind of information in badger?

Rperry2174 avatar Dec 20 '21 21:12 Rperry2174

@Rperry2174 oh yeah, definitely

petethepig avatar Dec 20 '21 21:12 petethepig

Adding some similar apis for reference:

  • https://docs.honeycomb.io/api/markers/
  • https://github.com/honeycombio/honeymarker
  • https://grafana.com/docs/grafana/v9.0/developers/http_api/annotations/

Rperry2174 avatar Aug 24 '22 19:08 Rperry2174