Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more prometheus metrics #1036

Closed
2 of 3 tasks
Tracked by #972
bonomat opened this issue Jul 30, 2023 · 7 comments
Closed
2 of 3 tasks
Tracked by #972

Add more prometheus metrics #1036

bonomat opened this issue Jul 30, 2023 · 7 comments
Assignees
Labels
Milestone

Comments

@bonomat
Copy link
Contributor

bonomat commented Jul 30, 2023

outside the scope of this ticket, but related:

@holzeis
Copy link
Contributor

holzeis commented Jul 30, 2023

Do we really need those business metrics in prometheus?

position metrics (PnL, size, direction, duration)

Isn't it sufficient to have this data in the database?

@bonomat
Copy link
Contributor Author

bonomat commented Jul 30, 2023

Yes please, it's helpful to have an overview (e.g. for warnings) at any point of time.

@holzeis
Copy link
Contributor

holzeis commented Jul 30, 2023

Well you can get an overview at any point in time also from the database, but I guess you want some alerting functionality?

@luckysori luckysori changed the title Add prometheus metric for ... Add more prometheus metrics Jul 31, 2023
@bonomat
Copy link
Contributor Author

bonomat commented Jul 31, 2023

Yes, I want to have the alerting functionality to warn us if things are in the red zone.

@klochowicz klochowicz assigned klochowicz and unassigned klochowicz Aug 25, 2023
@klochowicz
Copy link
Contributor

is having a Postgresql data source in grafana still something we're considering?
it seems that having a periodic query on that database and including it as time series would be a better way to gather position data in the long run:
https://grafana.com/docs/grafana/latest/datasources/postgres/

(in the meantime, I'm doing the position data as prometheus metrics).

@bonomat
Copy link
Contributor Author

bonomat commented Aug 28, 2023

is having a Postgresql data source in grafana still something we're considering?

Potentially, our data is now a better structured than it was with itchysats.

it seems that having a periodic query on that database and including it as time series would be a better way to gather position data in the long run:

I did some research a while ago and to my understanding grafana's sql connection expects the metrics in a timestamp format in the db to query them, i.e. a table somthing like this

timestamp value
2023-08-28 21:05 1
2023-08-28 21:10 2
2023-08-28 21:15 3

My understanding is that you cannot query something periodically and use the timestamp from when you queried it. Just think about it, Grafana would need to store this data again in a database and add a timestamp to it.
The data in the db needs to have the timestamp added to make suitable graphs

Most of our tables have this structure already so we could reconsider it but Grafana is not meant to be used for business metrics.

There are other tools which could do this job better: I looked into a few and metabase, or redash was most promising which can be run on our machine.

But I guess that's something for a different day :D

@klochowicz
Copy link
Contributor

I've extracted #1222 outside the scope of this ticket as my PR didn't address that part of the metrics.
cc: @holzeis who was interested in taking over some of the metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants