Skip to content

[WIP] driver metadata #1432

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: main
Choose a base branch
from
Open

[WIP] driver metadata #1432

wants to merge 1 commit into from

Conversation

sergiyvamz
Copy link
Contributor

Summary

Provide driver metadata as query comment, or a connection attributes

Additional Reviewers

@karenc-bq

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sergiyvamz sergiyvamz added the wip Pull request that is a work in progress label Jun 4, 2025
@sergiyvamz sergiyvamz changed the title driver metadata [WIP] driver metadata Jun 4, 2025
@sergiyvamz sergiyvamz force-pushed the driver-metrics branch 4 times, most recently from 8cf2546 to c28c354 Compare June 5, 2025 16:11
Copy link

github-actions bot commented Jun 5, 2025

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

final @NonNull HostSpec hostSpec) {

final String connectionAttributes = String.format(
"_jdbc_wrapper_name:aws_jdbc_driver,_jdbc_wrapper_version:%s,_jdbc_wrapper_plugins:%s",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reporting metrics for MySQL

// We'd like to make this query as "unique" as possible so we add such wierd WHERE conditions.
// That helps to keep this query in pg_stat_statements.
return String.format(
"SELECT /* _driver:aws_jdbc_driver,_driver_version:%s,_jdbc_wrapper_plugins:%s */ 'version', VERSION()"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reporting metrics with query comment for PG.

@sergiyvamz sergiyvamz removed the wip Pull request that is a work in progress label Jun 5, 2025
@sergiyvamz sergiyvamz changed the title [WIP] driver metadata driver metadata Jun 5, 2025
@sergiyvamz sergiyvamz added the wip Pull request that is a work in progress label Jun 10, 2025
@sergiyvamz sergiyvamz changed the title driver metadata [WIP] driver metadata Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Pull request that is a work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant