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

Record {transaction,sample}.sample_rate #804

Merged
merged 2 commits into from Sep 4, 2020
Merged

Conversation

axw
Copy link
Member

@axw axw commented Aug 23, 2020

Introduce the new ExtendedSampler interface, which
Samplers may implement to return the effective
sampling rate. This is implemented by the built-in
ratioSampler.

When starting a root transaction we now call the
ExtendedSampler method if implemented, and store
the effective sampling rate in the transaction's
tracestate under our "es" vendor key.

When receiving tracestate, we parse our "es" vendor
value and extract the sample rate.

When encoding transactions and spans we record the
sample rate (from tracestate) in the transaction and
span events.

@apmmachine
Copy link
Collaborator

apmmachine commented Aug 23, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #804 updated]

  • Start Time: 2020-09-03T09:20:15.788+0000

  • Duration: 28 min 46 sec

Test stats 🧪

Test Results
Failed 0
Passed 7393
Skipped 182
Total 7575

Steps errors

Expand to view the steps failures

  • Name: Download Codecov

    • Description: #!/bin/bash set -x curl -sSLo codecov.sh https://codecov.io/bash

    • Duration: 2 min 22 sec

    • Start Time: 2020-09-03T09:36:12.947+0000

    • log

  • Name: Download Codecov

    • Description: #!/bin/bash set -x curl -sSLo codecov.sh https://codecov.io/bash

    • Duration: 2 min 22 sec

    • Start Time: 2020-09-03T09:38:39.809+0000

    • log

@axw axw force-pushed the sample_rate branch 3 times, most recently from 338857e to 8fe4b32 Compare August 23, 2020 08:19
utils_go9.go Show resolved Hide resolved
Introduce the new ExtendedSampler interface, which
Samplers may implement to return the effective
sampling rate. This is implemented by the built-in
ratioSampler.

When starting a root transaction we now call the
ExtendedSampler method if implemented, and store
the effective sampling rate in the transaction's
tracestate under our "es" vendor key.

When receiving tracestate, we parse our "es" vendor
value and extract the sample rate.

When encoding transactions and spans we record the
sample rate (from tracestate) in the transaction and
span events.
@axw axw marked this pull request as ready for review September 3, 2020 01:38
@axw axw requested a review from jalvz September 3, 2020 01:38
sampler_test.go Show resolved Hide resolved
@felixbarny felixbarny linked an issue Sep 3, 2020 that may be closed by this pull request
@axw axw merged commit 489947b into elastic:master Sep 4, 2020
@axw axw deleted the sample_rate branch September 4, 2020 00:01
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.

Record and propagate sampling weight
4 participants