damianiandrea / mongodb-nats-connector

A connector that uses MongoDB's change streams to capture data changes and publishes those changes to NATS JetStream.
MIT License
48 stars 7 forks source link

Add observability for NATS operations #50

Closed damianiandrea closed 4 months ago

damianiandrea commented 4 months ago

This PR adds the following custom metrics:

nats_messages_published_total (Total number of published messages) nats_messages_failed_total (Total number of failed messages) nats_message_duration_seconds (Duration of message publishing in seconds)

Following the same pattern above, it also refactors MongoDB's metrics by merging the following:

mongodb_succeeded_command_duration_seconds (Duration of succeeded commands in seconds) mongodb_failed_command_duration_seconds (Duration of failed commands in seconds) Into

mongodb_command_duration_seconds *Duration of commands in seconds(