From 63fed9e3dfb8fb8a484789b7e7375811aa913d02 Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Fri, 31 Oct 2025 11:04:28 -0500 Subject: [PATCH] Add [0, 1] bounds for TraceIdRatioBasedSampler ratio --- schema-docs.md | 10 +++++++--- schema/tracer_provider.json | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/schema-docs.md b/schema-docs.md index 2f0a6658..11f9ba2d 100644 --- a/schema-docs.md +++ b/schema-docs.md @@ -5513,7 +5513,7 @@ Usages: | Property | Type | Required? | Constraints | Description | |---|---|---|---|---| -| `ratio` | one of:
* `number`
* `null`
| `false` | No constraints. | Configure trace_id_ratio.
If omitted or null, 1.0 is used.
| +| `ratio` | one of:
* `number`
* `null`
| `false` | * `minimum`: `0`
* `maximum`: `1`
| Configure trace_id_ratio.
If omitted or null, 1.0 is used.
|
Language support status @@ -5546,7 +5546,9 @@ Usages: "type": [ "number", "null" - ] + ], + "minimum": 0, + "maximum": 1 } } } @@ -5754,7 +5756,9 @@ Usages: "type": [ "number", "null" - ] + ], + "minimum": 0, + "maximum": 1 } } }, diff --git a/schema/tracer_provider.json b/schema/tracer_provider.json index d290c7da..6e771e0f 100644 --- a/schema/tracer_provider.json +++ b/schema/tracer_provider.json @@ -128,7 +128,9 @@ "additionalProperties": false, "properties": { "ratio": { - "type": ["number", "null"] + "type": ["number", "null"], + "minimum": 0, + "maximum": 1 } } },