openproject icon indicating copy to clipboard operation
openproject copied to clipboard

Export metrics in prometheus format #60181

Open top4ek opened this issue 8 months ago • 1 comments

Ticket

#60181

What are you trying to accomplish?

Add Prometheus metrics endpoints. Some OP instances are running inside closed networks without ability to use appsignal.

What approach did you choose and why?

Add yabeda gems to get metrics by Prometheus when OPENPROJECT_PROMETHEUS_EXPORT environment set to 'true'.

top4ek avatar Apr 03 '25 08:04 top4ek

I would like to see some documentation on what is being exported with this defualt configuration.

English is not my native, so could you check it? And do we need to add some short docs from gems used?

top4ek avatar Apr 03 '25 10:04 top4ek

@top4ek Why did rb_sys become dependency of pry 0.15.2?

toy avatar Apr 30 '25 16:04 toy

Oh, my bad. Conflicts while rebasing, look like I've forgot to "bundle" after.

top4ek avatar Apr 30 '25 17:04 top4ek

Unfortunately bundle (bundle install) or bundle lock seem to be ok with that extra dependency if it is already installed, seems that only clean install would make bundle complain, but not fix it

toy avatar Apr 30 '25 17:04 toy

Interesting. Just pulled dev and bundled — got rb_sys removed. Looks like you're right, in my case there's some updates triggered tree rebuild.

top4ek avatar Apr 30 '25 17:04 top4ek

Removing pry before running bundle also does remove extra dependency, it makes me wonder why did bundle install in CI fail complaining about odd dependency instead of silently fixing it

toy avatar Apr 30 '25 17:04 toy

Found it bundle config --local deployment true makes bundle error on incorrect dependencies

toy avatar Apr 30 '25 18:04 toy

Hi, just wondering: Is there some sort of docs as to how to configure and/or scrape the metrics?

famfop avatar Nov 13 '25 15:11 famfop

@famfop hi, you can start here.

top4ek avatar Nov 13 '25 16:11 top4ek