Skip to content

Port name sampler to containerd v2#7

Merged
Fricounet merged 2 commits into
just1not2/v2.0.0-rc.3from
fricounet/tracing-containerd-v2
Jul 18, 2024
Merged

Port name sampler to containerd v2#7
Fricounet merged 2 commits into
just1not2/v2.0.0-rc.3from
fricounet/tracing-containerd-v2

Conversation

@Fricounet
Copy link
Copy Markdown

@Fricounet Fricounet commented Jul 17, 2024

Port the changes from #6 to containerd v2. The main difference is that we now have to rely on OTEL env variables to configure the sampler. This is done with OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG that can be configured respectively with namebased/parentbased_name and a comma separated list of the traces to allow.

Example usage:

OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317 OTEL_EXPORTER_OTLP_PROTOCOL=grpc OTEL_TRACES_SAMPLER=parentbased_name OTEL_TRACES_SAMPLER_ARG="runtime.v1.ImageService/PullImage" containerd

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.
Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
@Fricounet Fricounet changed the title Fricounet/tracing containerd v2 Port name sampler to containerd v2 Jul 18, 2024
@Fricounet Fricounet marked this pull request as ready for review July 18, 2024 08:49
@Fricounet Fricounet merged commit 4b061dd into just1not2/v2.0.0-rc.3 Jul 18, 2024
just1not2 pushed a commit that referenced this pull request Aug 8, 2024
Update the dependency and the indirect golang.org/x/net version to align
with containerd 1.7 itself, and to prevent a vulnerability being detected.

This should not generally be an issue, as the API module is used by
containerd 1.7 and up, which already depend on a more current version of
these dependencies.

full diff: containerd/ttrpc@v1.2.3...v1.2.5

Before this:

    govulncheck ./...
    Scanning your code and 251 packages across 13 dependent modules for known vulnerabilities...

    === Symbol Results ===

    Vulnerability #1: GO-2024-2687
        HTTP/2 CONTINUATION flood in net/http
      More info: https://pkg.go.dev/vuln/GO-2024-2687
      Module: golang.org/x/net
        Found in: golang.org/x/net@v0.21.0
        Fixed in: golang.org/x/net@v0.23.0
        Example traces found:
          #1: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.ConnectionError.Error
          #2: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.ErrCode.String
          #3: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.FrameHeader.String
          #4: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.FrameType.String
          #5: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.Setting.String
          #6: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.SettingID.String
          #7: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.StreamError.Error
          #8: services/version/v1/version_grpc.pb.go:13:2: version.init calls status.init, which eventually calls http2.chunkWriter.Write
          #9: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.connError.Error
          #10: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.duplicatePseudoHeaderError.Error
          #11: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.headerFieldNameError.Error
          #12: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.headerFieldValueError.Error
          #13: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.pseudoHeaderError.Error
          #14: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.writeData.String

    Your code is affected by 1 vulnerability from 1 module.
    This scan also found 0 vulnerabilities in packages you import and 3
    vulnerabilities in modules you require, but your code doesn't appear to call
    these vulnerabilities.
    Use '-show verbose' for more details.

After this:

    govulncheck ./...
    Scanning your code and 251 packages across 13 dependent modules for known vulnerabilities...

    === Symbol Results ===

    No vulnerabilities found.

    Your code is affected by 0 vulnerabilities.
    This scan also found 0 vulnerabilities in packages you import and 3
    vulnerabilities in modules you require, but your code doesn't appear to call
    these vulnerabilities.
    Use '-show verbose' for more details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
just1not2 pushed a commit that referenced this pull request Aug 8, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
jaredledvina pushed a commit that referenced this pull request Aug 29, 2024
Update the dependency and the indirect golang.org/x/net version to align
with containerd itself, and to prevent a vulnerability being detected.

We should keep the versions <= versions used by containerd 1.7 to prevent
forcing users of containerd 1.7 in combination with the latest version
of the API module from having to update all their dependencies, but
this update should likely be fine (and aligns with 1.7).

Before this:

    Scanning your code and 254 packages across 15 dependent modules for known vulnerabilities...

    === Symbol Results ===

    Vulnerability #1: GO-2024-2687
        HTTP/2 CONTINUATION flood in net/http
      More info: https://pkg.go.dev/vuln/GO-2024-2687
      Module: golang.org/x/net
        Found in: golang.org/x/net@v0.21.0
        Fixed in: golang.org/x/net@v0.23.0
        Example traces found:
          #1: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.ConnectionError.Error
          #2: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.ErrCode.String
          #3: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.FrameHeader.String
          #4: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.FrameType.String
          #5: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.Setting.String
          #6: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.SettingID.String
          #7: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.StreamError.Error
          #8: services/content/v1/content_ttrpc.pb.go:272:35: content.ttrpccontentClient.Write calls ttrpc.Client.NewStream, which eventually calls http2.chunkWriter.Write
          #9: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.connError.Error
          #10: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.duplicatePseudoHeaderError.Error
          #11: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.headerFieldNameError.Error
          #12: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.headerFieldValueError.Error
          #13: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.pseudoHeaderError.Error
          #14: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.writeData.String

    Your code is affected by 1 vulnerability from 1 module.
    This scan also found 0 vulnerabilities in packages you import and 3
    vulnerabilities in modules you require, but your code doesn't appear to call
    these vulnerabilities.
    Use '-show verbose' for more details.

After this:

    govulncheck ./...
    Scanning your code and 251 packages across 13 dependent modules for known vulnerabilities...

    === Symbol Results ===

    No vulnerabilities found.

    Your code is affected by 0 vulnerabilities.
    This scan also found 0 vulnerabilities in packages you import and 3
    vulnerabilities in modules you require, but your code doesn't appear to call
    these vulnerabilities.
    Use '-show verbose' for more details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
just1not2 pushed a commit that referenced this pull request Sep 9, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Sep 10, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Nov 4, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Nov 6, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Nov 7, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Nov 7, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Dec 5, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Dec 6, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Dec 6, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Dec 6, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Dec 6, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Dec 9, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Dec 9, 2024
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Jan 13, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
just1not2 pushed a commit that referenced this pull request Jan 15, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
alguimodd pushed a commit that referenced this pull request Mar 31, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
Fricounet added a commit that referenced this pull request May 6, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
EricMountain pushed a commit that referenced this pull request May 13, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
EricMountain added a commit that referenced this pull request May 13, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.

Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>
EricMountain added a commit that referenced this pull request Jul 15, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.

Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>
EricMountain added a commit that referenced this pull request Jul 15, 2025
* Port name sampler to containerd v2 (#7) (#11)

* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.

Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>

* feat(tracing): propagate trace context (#10)

Co-authored-by: Justin Bera <justin.bera@datadoghq.com>

* Test showing RuntimeHandlers in Status() are unordered

Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>

* CRI: Stable sort for RuntimeHandlers

The runtimeHandlers list in the response to `crictl info` has unstable ordering
since commit 97eb1cd (underlying switch from list to map) that was shipped in
v2.1.0.

On Kubernetes nodes this causes the kubelet to update node status subresources
every time the order of runtime handlers changes in the status response from
containerd. The lieklihood increases with the number of runtime handlers present
on nodes. In some clusters this leads to every single node sending a status update
every few seconds leading to excessive Kube API server load.

This change enforces stable ordering on runtime handler names.

Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>

* Amend runtime handler test for stable order

Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>

---------

Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>
Co-authored-by: Justin Bera <justin.bera@datadoghq.com>
EricMountain added a commit that referenced this pull request Jul 15, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.

Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>
jaredledvina pushed a commit that referenced this pull request Sep 12, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.

Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>
jaredledvina pushed a commit that referenced this pull request Sep 15, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.

Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>
just1not2 pushed a commit that referenced this pull request Dec 3, 2025
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.

Co-authored-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>
jaredledvina pushed a commit that referenced this pull request Apr 3, 2026
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
jaredledvina pushed a commit that referenced this pull request Apr 3, 2026
* [tracing] Create NameSampler

Simple sampler that samples every span having a certain name.
It's best used in conjunction with the ParentBased sampler so that the child spans are also sampled.

* [tracing] Configure otlp plugin to use NameSampler

Allow the plugin to use the custom NameSampler if specified in the usual env vars used to specify the sampler `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG`. This sampler will allow to avoid emitting a lot of the noisy traces to only keep a subset of meaningful traces.
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.

2 participants