Prometheus metrics

I'd like to add more observability to underlying cloud providers' SDKs by adding prometheus metrics.
I'm mostly concerned with monitoring non standard responses, errors and retries.

My initial idea is by adding that functionality to fshttp::Transport

With promhttp package, more or less like in the example (without trace)

The static labels would be

  • fs name
  • HTTP host

I'd appreciate feedback regarding this idea and possible improvements to this design draft.

There is an issue about this

it looks like it has stalled - maybe you'd like to take it over?

Adding observability to the rclone Transport is a good way of capturing all the backends so that sounds like a great idea.

Where would you get fs name from? It is possible that the Transport is in use by two backends at once, eg if you are copying from s3 to google drive...

The issue is related but not the same. In the issue they want accounting data as metrics. Here I want what is currently darkness to become light.

We should have /metrics endpoint in the server this is a standard prometheus way of doing things.

FS name can be passed in constructor to fshttp but on the other hand it's not mandatory and not passing it would make the patch smaller.

Agreed, not the same but similar!

OK, happy to take your lead here.

OK, if you think it would be useful enough without then let's go for that.