CodeSampleX

Beispiel

go.opentelemetry.io/otel/sdk v1.24.0: ParentBased sampler delegates sampled remote parents to AlwaysSample and unsampled parents to NeverSample by default, overriding the root sampler configuration for any context containing a valid parent span

Verifiziertes Beispiel für golang go.opentelemetry.io/otel/sdk v1.24.0: ParentBased sampler delegates sampled remote parents to AlwaysSample and unsampled…

sha256:53b6e958b9713543736332d7b7f87d665da9d8c7c6468e96529ad968c51148fc

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
2
Deklarierte Umgebung go linux x64 go go go

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-17
go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-18

Fall

HOW
Ziel
ParentBased sampler delegates sampled remote parents to AlwaysSample and unsampled parents to NeverSample by default, overriding the root sampler configuration for any context containing a valid parent span
Pakete
Symbole
  • go.opentelemetry.io/otel/sdk/trace.ParentBased
Umgebung
go
Erstellt
2026-08-17T06:42:33Z

Contract

  1. ParentBased(NeverSample()) samples and exports child spans when the context contains a sampled remote parent, because ParentBased delegates sampled remote parents to AlwaysSample() by default rather than the configured root sampler.
  2. ParentBased(AlwaysSample()) drops and suppresses child spans when the context contains an unsampled remote or local parent, because ParentBased delegates unsampled parents to NeverSample() by default.
  3. Only root spans without a valid parent context evaluate the root sampler passed to ParentBased.
  4. ParentBased.Description() returns a composite string reflecting the root sampler and all four default sub-samplers.

Dateien

  • NOTES.md
  • csx.json
  • go.mod
  • go.sum
  • tracer_test.go

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed