Skip to content

cluster: add application_info #486

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkropachev
Copy link
Collaborator

@dkropachev dkropachev commented Jun 5, 2025

Implement clustr.application_info to make driver send following startup options to server:

  1. APPLICATION_NAME - ID what application is using driver, example: repo of the application
  2. APPLICATION_VERSION - Version of the application, example: release version or commit id of the application
  3. CLIENT_ID - unique id of the client instance, example: pod name

All strings.

Fix: #485

Results:

cqlsh> SELECT * FROM system_views.clients;

 address    | port  | client_options                                                                                                                                                                             | connection_stage | driver_name            | driver_version | hostname   | keyspace_name | protocol_version | request_count | ssl_cipher_suite | ssl_enabled | ssl_protocol | username
------------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------+----------------+------------+---------------+------------------+---------------+------------------+-------------+--------------+-----------
 172.17.0.1 | 55756 | {'APPLICATION_NAME': 'app_name', 'APPLICATION_VERSION': '1.1.1', 'CLIENT_ID': 'my_client_id', 'CQL_VERSION': '3.4.7', 'DRIVER_NAME': 'ScyllaDB Python Driver', 'DRIVER_VERSION': '3.29.3'} |            ready | ScyllaDB Python Driver |         3.29.3 | 172.17.0.1 |          null |                5 |            16 |             null |       False |         null | anonymous
 172.17.0.1 | 55762 | {'APPLICATION_NAME': 'app_name', 'APPLICATION_VERSION': '1.1.1', 'CLIENT_ID': 'my_client_id', 'CQL_VERSION': '3.4.7', 'DRIVER_NAME': 'ScyllaDB Python Driver', 'DRIVER_VERSION': '3.29.3'} |            ready | ScyllaDB Python Driver |         3.29.3 | 172.17.0.1 |          null |                5 |             1 |             null |       False |         null | anonymous

(4 rows)

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

@dkropachev dkropachev linked an issue Jun 5, 2025 that may be closed by this pull request
@dkropachev dkropachev self-assigned this Jun 5, 2025
@dkropachev dkropachev requested a review from Lorak-mmk June 5, 2025 02:20
Copy link

@Lorak-mmk Lorak-mmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add an integration test running on C* that uses the new API and verifies the data in client_info.

@dkropachev dkropachev force-pushed the dk/485-report-application-information-to-server branch 3 times, most recently from d7d7385 to 7e0a9d2 Compare June 6, 2025 11:46
@dkropachev dkropachev requested a review from Lorak-mmk June 6, 2025 12:34
@dkropachev dkropachev force-pushed the dk/485-report-application-information-to-server branch from 7e0a9d2 to bb58890 Compare June 7, 2025 03:22
@dkropachev dkropachev requested a review from Lorak-mmk June 7, 2025 03:22
@dkropachev dkropachev force-pushed the dk/485-report-application-information-to-server branch from bb58890 to 1c8fb4f Compare June 7, 2025 03:23
Implement clustr.application_info to make driver send following startup options to server:
1. `APPLICATION_NAME` - ID what application is using driver, example: repo of the application
2. `APPLICATION_VERSION` - Version of the application, example: release version or commit id of the application
3. `CLIENT_ID` - unique id of the client instance, example: pod name

All strings.
@dkropachev dkropachev force-pushed the dk/485-report-application-information-to-server branch from 1c8fb4f to 276b6c1 Compare June 7, 2025 04:44
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.

Report application information to server
2 participants