dashbitco / broadway_cloud_pub_sub

A Broadway producer for Google Cloud Pub/Sub
Apache License 2.0
70 stars 24 forks source link

Telemetry #72

Closed greg-rychlewski closed 2 years ago

greg-rychlewski commented 2 years ago

Hi,

Would you accept a PR to add telemetry to this library? In particular, I'm interested in adding metrics for the pull client to track when it polls and how many messages it is obtaining.

The background:

My team sometimes notices that the client stops polling even though the process is still alive and no errors are logged. We haven't had any luck reproducing the issue or thinking of a plausible scenario that could make it happen. So we were hoping to use telemetry to get a better idea of when it is happening.

wojtekmach commented 2 years ago

We're already using Telemetry since Finch depends on it. Check out the Finch events that are already emitted.

wojtekmach commented 2 years ago

Oh, the change with Finch dependency is not yet released to Hex. Give main branch a shot then.

greg-rychlewski commented 2 years ago

Thanks the Finch events look perfect for my purpose!