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

Client properties #398

Merged
merged 2 commits into from
May 7, 2024
Merged

Conversation

sharshenov
Copy link
Contributor

Thank you for this project! ❤️

I've noticed an opportunity to enhance observability from the broker's perspective.

Firstly, introducing a feature to set a human-friendly connection name would greatly improve the ability to distinguish connections easily.

Secondly, providing additional information in client properties could be useful in identifying issues with applications, such as the application version.

With this pull request, I propose adding two additional configuration options:

  1. connection_name - to set the connection name conveniently. It can be easily controlled with the HUTCH_CONNECTION_NAME environment variable, requiring no explicit configuration.
  2. mq_client_properties - to manage all client properties, including the connection_name.
    Hutch::Config.set :mq_client_properties,
                      connection_name: 'human-friendly-consumer-name',
                      product: 'SomethingCool',
                      version: 'commit-sha',
                      information: 'http://example.com/repo/commits/commit-sha'
Before

Screenshot from 2024-05-06 20-27-51

Screenshot from 2024-05-06 20-46-05

After

Screenshot from 2024-05-06 20-55-33

Screenshot from 2024-05-06 20-53-58

@sharshenov
Copy link
Contributor Author

The test failure is not relevant to the change. I have no permissions to restart the build.

@michaelklishin michaelklishin merged commit cb7b1ba into ruby-amqp:main May 7, 2024
4 checks passed
@michaelklishin
Copy link
Member

Exposing client-provided connection name is definitely a good idea. Thank you for contributing!

@sharshenov sharshenov deleted the client-properties branch May 7, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants