Skip to content

Add ability to configure sampling rate based on transaction span name #1531

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

Conversation

jclusso
Copy link
Contributor

@jclusso jclusso commented Mar 28, 2025

What does this pull request do?

Adds new configuration option so you can set the sampling rate by transaction name. I'm not 100% certain this is the correct way to do this, so please let me know if I should be going about this in a different manner.

{
  transaction_sample_rate_by_name: {
    "UsersController#index": 1.0
    "HealthController#ping": 0
  }
}

Why is it important?

When you have an application with certain portions that get a significant amount of traffic, there is currently no good way to control the sampling. Either you are blind to low volume transactions or have to collect a lot more samples than you need. You can currently get around this with Tail-based sampling, but this is not available on serverless. This also still requires you send a ton of data to your APM server that you may not need to.

Checklist

  • I have signed the Contributor License Agreement.
  • My code follows the style guidelines of this project (See .rubocop.yml)
  • I have rebased my changes on top of the latest main branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have made corresponding changes to the documentation
  • I have updated docs/release-notes/index.md
  • I have updated docs/reference/supported-technologies.md
  • Added an API method or config option? Document in which version this will be introduced

Related issues

Resolves #1334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to override transaction_sample_rate on a per controller basis
1 participant