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

Add options: query_only? and resource_fun #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sekiyama58
Copy link

This pull request adds 2 options:

  • query_only?
    • By specifying query_only?: true, only parent query spans are sent, and child queue / run_query / decode spans are omitted.
      This makes trace data size ~1/4.
  • resource_fun
    • Instead of adding telemetry_options to every query, this allows to provide a custom function to convert a query to span's resource.
      It is useful to group queries by target table names, for example.

By specifying the `query_only?` option to true, only parent query spans
are sent, and child spans are omitted.
This makes trace data size ~1/4.
@sekiyama58
Copy link
Author

sekiyama58 commented Aug 17, 2022

For example, with these 2 options, we can make statistics of most accessed tables/access types from spans like this:
image

…a query

Instead of adding `telemetry_options` to every query, this allows to provide
a custom function to convert a query to span's resource.
It is useful to group queries by target table names, for example.
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.

1 participant