diff --git a/Makefile b/Makefile index ac695bac..40067190 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ update-file-format: done .PHONY: fix-language-implementations -fix-language-implementations: +fix-language-implementations: compile-schema npm run-script fix-language-implementations || exit 1; \ .PHONY: generate-markdown diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index f26130f0..6e53ee1d 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -289,8 +289,47 @@ tracer_provider: ratio: 0.01 local_parent_sampled: composite/development: - probability: - ratio: 0.001 + # Configure sampler to be rule_based. + rule_based: + # The rules for the sampler, matched in order. Each rule can have multiple match conditions - the sampler will be applied if all match. + # If no conditions are specified, the rule matches all spans that reach it. If no rules match, the span is not sampled. + rules: + - attribute_values: + key: http.route + values: + - /healthz + - /livez + # Configure sampler when matched. + sampler: + # Configure sampler to be always_off if matched. + always_off: + # Configure a sampling rule matching http.path attribute patterns. + - attribute_patterns: + key: http.path + included: + - /internal/* + excluded: + - /internal/special/* + # Configure sampler when matched. + sampler: + # Configure sampler to be always_on if matched. + always_on: + # Configure a sampling rule matching root spans with CLIENT span kind. + - parent: + - none + span_kinds: + - client + sampler: + # Configure sampler to be probability if matched. + probability: + ratio: 0.05 + - sampler: + probability: + # Configure ratio. + # If omitted or null, 1.0 is used. + ratio: 0.001 + # Configure local_parent_not_sampled sampler. + # If omitted or null, always_off is used. local_parent_not_sampled: always_off: tracer_configurator/development: diff --git a/opentelemetry_configuration.json b/opentelemetry_configuration.json index 700e16fa..01f13564 100644 --- a/opentelemetry_configuration.json +++ b/opentelemetry_configuration.json @@ -517,6 +517,114 @@ } } }, + "ExperimentalComposableRuleBasedSampler": { + "type": [ + "object", + "null" + ], + "additionalProperties": false, + "properties": { + "rules": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRule" + }, + "description": "The rules for the sampler, matched in order. If no rules match, the span is not sampled.\nIf omitted or null, no span is sampled.\n" + } + } + }, + "ExperimentalComposableRuleBasedSamplerRule": { + "type": "object", + "description": "A rule for ExperimentalComposableRuleBasedSampler. A rule can have multiple match conditions - the sampler will be applied if all match. \nIf no conditions are specified, the rule matches all spans that reach it.\n", + "additionalProperties": false, + "properties": { + "attribute_values": { + "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRuleAttributeValues", + "description": "Values to match against a single attribute. Non-string attributes are matched using their string representation:\nfor example, a value of \"404\" would match the http.response.status_code 404. For array attributes, if any\nitem matches, it is considered a match.\nIf omitted, ignore.\n" + }, + "attribute_patterns": { + "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRuleAttributePatterns", + "description": "Patterns to match against a single attribute. Non-string attributes are matched using their string representation:\nfor example, a pattern of \"4*\" would match any http.response.status_code in 400-499. For array attributes, if any\nitem matches, it is considered a match.\nIf omitted, ignore.\n" + }, + "span_kinds": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/SpanKind" + }, + "description": "The span kinds to match. If the span's kind matches any of these, it matches.\nIf omitted, ignore.\n" + }, + "parent": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/ExperimentalSpanParent" + }, + "description": "The parent span types to match.\nIf omitted, ignore.\n" + }, + "sampler": { + "$ref": "#/$defs/ExperimentalComposableSampler", + "description": "The sampler to use for matching spans.\nProperty is required and must be non-null.\n" + } + }, + "required": [ + "sampler" + ] + }, + "ExperimentalComposableRuleBasedSamplerRuleAttributePatterns": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "The attribute key to match against.\nProperty is required and must be non-null.\n" + }, + "included": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "description": "Configure list of value patterns to include.\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, all values are included.\n" + }, + "excluded": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "description": "Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).\nValues are evaluated to match as follows:\n * If the value exactly matches.\n * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\nIf omitted, .included attributes are included.\n" + } + }, + "required": [ + "key" + ] + }, + "ExperimentalComposableRuleBasedSamplerRuleAttributeValues": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "The attribute key to match against.\nProperty is required and must be non-null.\n" + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "description": "The attribute values to match against. If the attribute's value matches any of these, it matches.\nProperty is required and must be non-null.\n" + } + }, + "required": [ + "key", + "values" + ] + }, "ExperimentalComposableSampler": { "type": "object", "additionalProperties": { @@ -543,6 +651,10 @@ "probability": { "$ref": "#/$defs/ExperimentalComposableProbabilitySampler", "description": "Configure sampler to be probability.\nIf omitted, ignore.\n" + }, + "rule_based": { + "$ref": "#/$defs/ExperimentalComposableRuleBasedSampler", + "description": "Configure sampler to be rule_based.\nIf omitted, ignore.\n" } } }, @@ -1055,6 +1167,17 @@ ], "additionalProperties": false }, + "ExperimentalSpanParent": { + "type": [ + "string", + "null" + ], + "enum": [ + "none", + "remote", + "local" + ] + }, "ExperimentalTracerConfig": { "type": [ "object" @@ -2028,6 +2151,19 @@ } } }, + "SpanKind": { + "type": [ + "string", + "null" + ], + "enum": [ + "internal", + "server", + "client", + "producer", + "consumer" + ] + }, "SpanLimits": { "type": "object", "additionalProperties": false, diff --git a/schema-docs.md b/schema-docs.md index df52e8eb..4c8ff6f3 100644 --- a/schema-docs.md +++ b/schema-docs.md @@ -3030,6 +3030,55 @@ Usages: } +## SpanKind + +This is a enum type. + +| Value | Description | +|---|---| +| `client` | client, a client span. | +| `consumer` | consumer, a consumer span. | +| `internal` | internal, an internal span. | +| `producer` | producer, a producer span. | +| `server` | server, a server span. | + +
+Language support status + +| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) | +|---|---|---|---|---| +| `client` | unknown | unknown | unknown | unknown | +| `consumer` | unknown | unknown | unknown | unknown | +| `internal` | unknown | unknown | unknown | unknown | +| `producer` | unknown | unknown | unknown | unknown | +| `server` | unknown | unknown | unknown | unknown | +
+ +No constraints. + +Usages: + +* [`ExperimentalComposableRuleBasedSamplerRule.span_kinds`](#experimentalcomposablerulebasedsamplerrule) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.yaml) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "internal",
+    "server",
+    "client",
+    "producer",
+    "consumer"
+  ]
+}
+
+ ## SpanLimits | Property | Type | Required? | Default and Null Behavior | Constraints | Description | @@ -3757,6 +3806,242 @@ Usages: } +## ExperimentalComposableRuleBasedSampler + +> [!WARNING] +> This type is [experimental](VERSIONING.md#experimental-features). + +| Property | Type | Required? | Default and Null Behavior | Constraints | Description | +|---|---|---|---|---|---| +| `rules` | one of:
* `array`
* `null`
| `false` | If omitted or null, no span is sampled. | No constraints. | The rules for the sampler, matched in order. If no rules match, the span is not sampled.
| + +
+Language support status + +| Property | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) | +|---|---|---|---|---| +| `rules` | unknown | unknown | unknown | unknown | +
+ +Constraints: + +* `additionalProperties`: `false` + +Usages: + +* [`ExperimentalComposableSampler.rule_based`](#experimentalcomposablesampler) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.yaml) +
{
+  "type": [
+    "object",
+    "null"
+  ],
+  "additionalProperties": false,
+  "properties": {
+    "rules": {
+      "type": [
+        "array",
+        "null"
+      ],
+      "items": {
+        "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRule"
+      }
+    }
+  }
+}
+
+ +## ExperimentalComposableRuleBasedSamplerRule + +> [!WARNING] +> This type is [experimental](VERSIONING.md#experimental-features). + +| Property | Type | Required? | Default and Null Behavior | Constraints | Description | +|---|---|---|---|---|---| +| `attribute_patterns` | [`ExperimentalComposableRuleBasedSamplerRuleAttributePatterns`](#experimentalcomposablerulebasedsamplerruleattributepatterns) | `false` | If omitted, ignore. | No constraints. | Patterns to match against a single attribute. Non-string attributes are matched using their string representation:
for example, a pattern of "4*" would match any http.response.status_code in 400-499. For array attributes, if any
item matches, it is considered a match.
| +| `attribute_values` | [`ExperimentalComposableRuleBasedSamplerRuleAttributeValues`](#experimentalcomposablerulebasedsamplerruleattributevalues) | `false` | If omitted, ignore. | No constraints. | Values to match against a single attribute. Non-string attributes are matched using their string representation:
for example, a value of "404" would match the http.response.status_code 404. For array attributes, if any
item matches, it is considered a match.
| +| `parent` | `array` of [`ExperimentalSpanParent`](#experimentalspanparent) | `false` | If omitted, ignore. | * `minItems`: `1`
| The parent span types to match. | +| `sampler` | [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | `true` | Property is required and must be non-null. | No constraints. | The sampler to use for matching spans. | +| `span_kinds` | `array` of [`SpanKind`](#spankind) | `false` | If omitted, ignore. | * `minItems`: `1`
| The span kinds to match. If the span's kind matches any of these, it matches. | + +
+Language support status + +| Property | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) | +|---|---|---|---|---| +| `attribute_patterns` | unknown | unknown | unknown | unknown | +| `attribute_values` | unknown | unknown | unknown | unknown | +| `parent` | unknown | unknown | unknown | unknown | +| `sampler` | unknown | unknown | unknown | unknown | +| `span_kinds` | unknown | unknown | unknown | unknown | +
+ +Constraints: + +* `additionalProperties`: `false` +* `required`: `["sampler"]` + +No usages. + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.yaml) +
{
+  "type": "object",
+  "description": "A rule for ExperimentalComposableRuleBasedSampler. A rule can have multiple match conditions - the sampler will be applied if all match. \nIf no conditions are specified, the rule matches all spans that reach it.\n",
+  "additionalProperties": false,
+  "properties": {
+    "attribute_values": {
+      "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRuleAttributeValues"
+    },
+    "attribute_patterns": {
+      "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRuleAttributePatterns"
+    },
+    "span_kinds": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "$ref": "#/$defs/SpanKind"
+      }
+    },
+    "parent": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "$ref": "#/$defs/ExperimentalSpanParent"
+      }
+    },
+    "sampler": {
+      "$ref": "#/$defs/ExperimentalComposableSampler"
+    }
+  },
+  "required": [
+    "sampler"
+  ]
+}
+
+ +## ExperimentalComposableRuleBasedSamplerRuleAttributePatterns + +> [!WARNING] +> This type is [experimental](VERSIONING.md#experimental-features). + +| Property | Type | Required? | Default and Null Behavior | Constraints | Description | +|---|---|---|---|---|---| +| `excluded` | `array` of `string` | `false` | If omitted, .included attributes are included. | * `minItems`: `1`
| Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included).
Values are evaluated to match as follows:
* If the value exactly matches.
* If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
| +| `included` | `array` of `string` | `false` | If omitted, all values are included. | * `minItems`: `1`
| Configure list of value patterns to include.
Values are evaluated to match as follows:
* If the value exactly matches.
* If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
| +| `key` | `string` | `true` | Property is required and must be non-null. | No constraints. | The attribute key to match against. | + +
+Language support status + +| Property | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) | +|---|---|---|---|---| +| `excluded` | unknown | unknown | unknown | unknown | +| `included` | unknown | unknown | unknown | unknown | +| `key` | unknown | unknown | unknown | unknown | +
+ +Constraints: + +* `additionalProperties`: `false` +* `required`: `["key"]` + +Usages: + +* [`ExperimentalComposableRuleBasedSamplerRule.attribute_patterns`](#experimentalcomposablerulebasedsamplerrule) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.yaml) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "key": {
+      "type": "string"
+    },
+    "included": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "type": "string"
+      }
+    },
+    "excluded": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": [
+    "key"
+  ]
+}
+
+ +## ExperimentalComposableRuleBasedSamplerRuleAttributeValues + +> [!WARNING] +> This type is [experimental](VERSIONING.md#experimental-features). + +| Property | Type | Required? | Default and Null Behavior | Constraints | Description | +|---|---|---|---|---|---| +| `key` | `string` | `true` | Property is required and must be non-null. | No constraints. | The attribute key to match against. | +| `values` | `array` of `string` | `true` | Property is required and must be non-null. | * `minItems`: `1`
| The attribute values to match against. If the attribute's value matches any of these, it matches. | + +
+Language support status + +| Property | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) | +|---|---|---|---|---| +| `key` | unknown | unknown | unknown | unknown | +| `values` | unknown | unknown | unknown | unknown | +
+ +Constraints: + +* `additionalProperties`: `false` +* `required`: `["key","values"]` + +Usages: + +* [`ExperimentalComposableRuleBasedSamplerRule.attribute_values`](#experimentalcomposablerulebasedsamplerrule) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.yaml) +
{
+  "type": "object",
+  "additionalProperties": false,
+  "properties": {
+    "key": {
+      "type": "string"
+    },
+    "values": {
+      "type": "array",
+      "minItems": 1,
+      "items": {
+        "type": "string"
+      }
+    }
+  },
+  "required": [
+    "key",
+    "values"
+  ]
+}
+
+ ## ExperimentalComposableSampler > [!WARNING] @@ -3768,6 +4053,7 @@ Usages: | `always_on` | [`ExperimentalComposableAlwaysOnSampler`](#experimentalcomposablealwaysonsampler) | `false` | If omitted, ignore. | No constraints. | Configure sampler to be always_on. | | `parent_based` | [`ExperimentalComposableParentBasedSampler`](#experimentalcomposableparentbasedsampler) | `false` | If omitted, ignore. | No constraints. | Configure sampler to be parent_based. | | `probability` | [`ExperimentalComposableProbabilitySampler`](#experimentalcomposableprobabilitysampler) | `false` | If omitted, ignore. | No constraints. | Configure sampler to be probability. | +| `rule_based` | [`ExperimentalComposableRuleBasedSampler`](#experimentalcomposablerulebasedsampler) | `false` | If omitted, ignore. | No constraints. | Configure sampler to be rule_based. |
Language support status @@ -3778,6 +4064,7 @@ Usages: | `always_on` | unknown | unknown | unknown | unknown | | `parent_based` | unknown | unknown | unknown | unknown | | `probability` | unknown | unknown | unknown | unknown | +| `rule_based` | unknown | unknown | unknown | unknown |
Constraints: @@ -3794,6 +4081,7 @@ Usages: * [`ExperimentalComposableParentBasedSampler.remote_parent_not_sampled`](#experimentalcomposableparentbasedsampler) * [`ExperimentalComposableParentBasedSampler.local_parent_sampled`](#experimentalcomposableparentbasedsampler) * [`ExperimentalComposableParentBasedSampler.local_parent_not_sampled`](#experimentalcomposableparentbasedsampler) +* [`ExperimentalComposableRuleBasedSamplerRule.sampler`](#experimentalcomposablerulebasedsamplerrule)
JSON Schema @@ -3821,6 +4109,9 @@ Usages: }, "probability": { "$ref": "#/$defs/ExperimentalComposableProbabilitySampler" + }, + "rule_based": { + "$ref": "#/$defs/ExperimentalComposableRuleBasedSampler" } } } @@ -5133,6 +5424,52 @@ Usages: }
+## ExperimentalSpanParent + +> [!WARNING] +> This type is [experimental](VERSIONING.md#experimental-features). + +This is a enum type. + +| Value | Description | +|---|---| +| `local` | local, a local parent. | +| `none` | none, no parent, i.e., the trace root. | +| `remote` | remote, a remote parent. | + +
+Language support status + +| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) | +|---|---|---|---|---| +| `local` | unknown | unknown | unknown | unknown | +| `none` | unknown | unknown | unknown | unknown | +| `remote` | unknown | unknown | unknown | unknown | +
+ +No constraints. + +Usages: + +* [`ExperimentalComposableRuleBasedSamplerRule.parent`](#experimentalcomposablerulebasedsamplerrule) + +
+JSON Schema + +[JSON Schema Source File](./schema/tracer_provider.yaml) +
{
+  "type": [
+    "string",
+    "null"
+  ],
+  "enum": [
+    "none",
+    "remote",
+    "local"
+  ]
+}
+
+ ## ExperimentalTracerConfig > [!WARNING] @@ -5346,6 +5683,7 @@ Latest supported file format: `1.0.0-rc.2` | [`SimpleLogRecordProcessor`](#simplelogrecordprocessor) | supported | | * `exporter`: supported
| | [`SimpleSpanProcessor`](#simplespanprocessor) | supported | | * `exporter`: supported
| | [`SpanExporter`](#spanexporter) | supported | | * `console`: supported
* `otlp_grpc`: supported
* `otlp_http`: supported
* `otlp_file/development`: supported
| +| [`SpanKind`](#spankind) | unknown | | * `client`: unknown
* `consumer`: unknown
* `internal`: unknown
* `producer`: unknown
* `server`: unknown
| | [`SpanLimits`](#spanlimits) | supported | | * `attribute_count_limit`: supported
* `attribute_value_length_limit`: supported
* `event_attribute_count_limit`: supported
* `event_count_limit`: supported
* `link_attribute_count_limit`: supported
* `link_count_limit`: supported
| | [`SpanProcessor`](#spanprocessor) | supported | | * `batch`: supported
* `simple`: supported
| | [`SumAggregation`](#sumaggregation) | supported | | | @@ -5360,7 +5698,11 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalComposableAlwaysOnSampler`](#experimentalcomposablealwaysonsampler) | unknown | | | | [`ExperimentalComposableParentBasedSampler`](#experimentalcomposableparentbasedsampler) | unknown | | * `local_parent_not_sampled`: unknown
* `local_parent_sampled`: unknown
* `remote_parent_not_sampled`: unknown
* `remote_parent_sampled`: unknown
* `root`: unknown
| | [`ExperimentalComposableProbabilitySampler`](#experimentalcomposableprobabilitysampler) | unknown | | * `ratio`: unknown
| -| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
| +| [`ExperimentalComposableRuleBasedSampler`](#experimentalcomposablerulebasedsampler) | unknown | | * `rules`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRule`](#experimentalcomposablerulebasedsamplerrule) | unknown | | * `attribute_patterns`: unknown
* `attribute_values`: unknown
* `parent`: unknown
* `sampler`: unknown
* `span_kinds`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributePatterns`](#experimentalcomposablerulebasedsamplerruleattributepatterns) | unknown | | * `excluded`: unknown
* `included`: unknown
* `key`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributeValues`](#experimentalcomposablerulebasedsamplerruleattributevalues) | unknown | | * `key`: unknown
* `values`: unknown
| +| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
* `rule_based`: unknown
| | [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | not_implemented | | | | [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | not_applicable | | * `http`: not_applicable
* `peer`: not_applicable
| | [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | not_implemented | | | @@ -5387,6 +5729,7 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | not_implemented | | * `attributes`: not_implemented
* `detectors`: not_implemented
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | not_implemented | | * `container`: not_implemented
* `host`: not_implemented
* `process`: not_implemented
* `service`: not_implemented
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | not_implemented | | | +| [`ExperimentalSpanParent`](#experimentalspanparent) | unknown | | * `local`: unknown
* `none`: unknown
* `remote`: unknown
| | [`ExperimentalTracerConfig`](#experimentaltracerconfig) | not_implemented | | * `disabled`: not_implemented
| | [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | not_implemented | | * `default_config`: not_implemented
* `tracers`: not_implemented
| | [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | not_implemented | | * `config`: not_implemented
* `name`: not_implemented
| @@ -5453,6 +5796,7 @@ Latest supported file format: `0.3.0` | [`SimpleLogRecordProcessor`](#simplelogrecordprocessor) | unknown | | * `exporter`: unknown
| | [`SimpleSpanProcessor`](#simplespanprocessor) | unknown | | * `exporter`: unknown
| | [`SpanExporter`](#spanexporter) | unknown | | * `console`: unknown
* `otlp_grpc`: unknown
* `otlp_http`: unknown
* `otlp_file/development`: unknown
| +| [`SpanKind`](#spankind) | unknown | | * `client`: unknown
* `consumer`: unknown
* `internal`: unknown
* `producer`: unknown
* `server`: unknown
| | [`SpanLimits`](#spanlimits) | unknown | | * `attribute_count_limit`: unknown
* `attribute_value_length_limit`: unknown
* `event_attribute_count_limit`: unknown
* `event_count_limit`: unknown
* `link_attribute_count_limit`: unknown
* `link_count_limit`: unknown
| | [`SpanProcessor`](#spanprocessor) | unknown | | * `batch`: unknown
* `simple`: unknown
| | [`SumAggregation`](#sumaggregation) | unknown | | | @@ -5467,7 +5811,11 @@ Latest supported file format: `0.3.0` | [`ExperimentalComposableAlwaysOnSampler`](#experimentalcomposablealwaysonsampler) | unknown | | | | [`ExperimentalComposableParentBasedSampler`](#experimentalcomposableparentbasedsampler) | unknown | | * `local_parent_not_sampled`: unknown
* `local_parent_sampled`: unknown
* `remote_parent_not_sampled`: unknown
* `remote_parent_sampled`: unknown
* `root`: unknown
| | [`ExperimentalComposableProbabilitySampler`](#experimentalcomposableprobabilitysampler) | unknown | | * `ratio`: unknown
| -| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
| +| [`ExperimentalComposableRuleBasedSampler`](#experimentalcomposablerulebasedsampler) | unknown | | * `rules`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRule`](#experimentalcomposablerulebasedsamplerrule) | unknown | | * `attribute_patterns`: unknown
* `attribute_values`: unknown
* `parent`: unknown
* `sampler`: unknown
* `span_kinds`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributePatterns`](#experimentalcomposablerulebasedsamplerruleattributepatterns) | unknown | | * `excluded`: unknown
* `included`: unknown
* `key`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributeValues`](#experimentalcomposablerulebasedsamplerruleattributevalues) | unknown | | * `key`: unknown
* `values`: unknown
| +| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
* `rule_based`: unknown
| | [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | unknown | | | | [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | unknown | | * `http`: unknown
* `peer`: unknown
| | [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | unknown | | | @@ -5494,6 +5842,7 @@ Latest supported file format: `0.3.0` | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | unknown | | * `attributes`: unknown
* `detectors`: unknown
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | unknown | | * `container`: unknown
* `host`: unknown
* `process`: unknown
* `service`: unknown
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | unknown | | | +| [`ExperimentalSpanParent`](#experimentalspanparent) | unknown | | * `local`: unknown
* `none`: unknown
* `remote`: unknown
| | [`ExperimentalTracerConfig`](#experimentaltracerconfig) | unknown | | * `disabled`: unknown
| | [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | unknown | | * `default_config`: unknown
* `tracers`: unknown
| | [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | unknown | | * `config`: unknown
* `name`: unknown
| @@ -5560,6 +5909,7 @@ Latest supported file format: `1.0.0-rc.1` | [`SimpleLogRecordProcessor`](#simplelogrecordprocessor) | supported | | * `exporter`: supported
| | [`SimpleSpanProcessor`](#simplespanprocessor) | supported | | * `exporter`: supported
| | [`SpanExporter`](#spanexporter) | supported | | * `console`: supported
* `otlp_grpc`: supported
* `otlp_http`: supported
* `otlp_file/development`: supported
| +| [`SpanKind`](#spankind) | unknown | | * `client`: unknown
* `consumer`: unknown
* `internal`: unknown
* `producer`: unknown
* `server`: unknown
| | [`SpanLimits`](#spanlimits) | supported | | * `attribute_count_limit`: supported
* `attribute_value_length_limit`: supported
* `event_attribute_count_limit`: supported
* `event_count_limit`: supported
* `link_attribute_count_limit`: supported
* `link_count_limit`: supported
| | [`SpanProcessor`](#spanprocessor) | supported | | * `batch`: supported
* `simple`: supported
| | [`SumAggregation`](#sumaggregation) | supported | | | @@ -5574,7 +5924,11 @@ Latest supported file format: `1.0.0-rc.1` | [`ExperimentalComposableAlwaysOnSampler`](#experimentalcomposablealwaysonsampler) | unknown | | | | [`ExperimentalComposableParentBasedSampler`](#experimentalcomposableparentbasedsampler) | unknown | | * `local_parent_not_sampled`: unknown
* `local_parent_sampled`: unknown
* `remote_parent_not_sampled`: unknown
* `remote_parent_sampled`: unknown
* `root`: unknown
| | [`ExperimentalComposableProbabilitySampler`](#experimentalcomposableprobabilitysampler) | unknown | | * `ratio`: unknown
| -| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
| +| [`ExperimentalComposableRuleBasedSampler`](#experimentalcomposablerulebasedsampler) | unknown | | * `rules`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRule`](#experimentalcomposablerulebasedsamplerrule) | unknown | | * `attribute_patterns`: unknown
* `attribute_values`: unknown
* `parent`: unknown
* `sampler`: unknown
* `span_kinds`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributePatterns`](#experimentalcomposablerulebasedsamplerruleattributepatterns) | unknown | | * `excluded`: unknown
* `included`: unknown
* `key`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributeValues`](#experimentalcomposablerulebasedsamplerruleattributevalues) | unknown | | * `key`: unknown
* `values`: unknown
| +| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
* `rule_based`: unknown
| | [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | supported | | | | [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | supported | | * `http`: supported
* `peer`: supported
| | [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | supported | | | @@ -5601,6 +5955,7 @@ Latest supported file format: `1.0.0-rc.1` | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | supported | | * `attributes`: supported
* `detectors`: supported
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | supported | | * `container`: supported
* `host`: supported
* `process`: supported
* `service`: supported
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | supported | | | +| [`ExperimentalSpanParent`](#experimentalspanparent) | unknown | | * `local`: unknown
* `none`: unknown
* `remote`: unknown
| | [`ExperimentalTracerConfig`](#experimentaltracerconfig) | supported | | * `disabled`: supported
| | [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | supported | | * `default_config`: supported
* `tracers`: supported
| | [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | supported | | * `config`: supported
* `name`: supported
| @@ -5667,6 +6022,7 @@ Latest supported file format: `1.0.0-rc.2` | [`SimpleLogRecordProcessor`](#simplelogrecordprocessor) | unknown | | * `exporter`: unknown
| | [`SimpleSpanProcessor`](#simplespanprocessor) | unknown | | * `exporter`: unknown
| | [`SpanExporter`](#spanexporter) | unknown | | * `console`: unknown
* `otlp_grpc`: unknown
* `otlp_http`: unknown
* `otlp_file/development`: unknown
| +| [`SpanKind`](#spankind) | unknown | | * `client`: unknown
* `consumer`: unknown
* `internal`: unknown
* `producer`: unknown
* `server`: unknown
| | [`SpanLimits`](#spanlimits) | unknown | | * `attribute_count_limit`: unknown
* `attribute_value_length_limit`: unknown
* `event_attribute_count_limit`: unknown
* `event_count_limit`: unknown
* `link_attribute_count_limit`: unknown
* `link_count_limit`: unknown
| | [`SpanProcessor`](#spanprocessor) | unknown | | * `batch`: unknown
* `simple`: unknown
| | [`SumAggregation`](#sumaggregation) | unknown | | | @@ -5681,7 +6037,11 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalComposableAlwaysOnSampler`](#experimentalcomposablealwaysonsampler) | unknown | | | | [`ExperimentalComposableParentBasedSampler`](#experimentalcomposableparentbasedsampler) | unknown | | * `local_parent_not_sampled`: unknown
* `local_parent_sampled`: unknown
* `remote_parent_not_sampled`: unknown
* `remote_parent_sampled`: unknown
* `root`: unknown
| | [`ExperimentalComposableProbabilitySampler`](#experimentalcomposableprobabilitysampler) | unknown | | * `ratio`: unknown
| -| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
| +| [`ExperimentalComposableRuleBasedSampler`](#experimentalcomposablerulebasedsampler) | unknown | | * `rules`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRule`](#experimentalcomposablerulebasedsamplerrule) | unknown | | * `attribute_patterns`: unknown
* `attribute_values`: unknown
* `parent`: unknown
* `sampler`: unknown
* `span_kinds`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributePatterns`](#experimentalcomposablerulebasedsamplerruleattributepatterns) | unknown | | * `excluded`: unknown
* `included`: unknown
* `key`: unknown
| +| [`ExperimentalComposableRuleBasedSamplerRuleAttributeValues`](#experimentalcomposablerulebasedsamplerruleattributevalues) | unknown | | * `key`: unknown
* `values`: unknown
| +| [`ExperimentalComposableSampler`](#experimentalcomposablesampler) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `parent_based`: unknown
* `probability`: unknown
* `rule_based`: unknown
| | [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | unknown | | | | [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | unknown | | * `http`: unknown
* `peer`: unknown
| | [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | unknown | | | @@ -5708,6 +6068,7 @@ Latest supported file format: `1.0.0-rc.2` | [`ExperimentalResourceDetection`](#experimentalresourcedetection) | unknown | | * `attributes`: unknown
* `detectors`: unknown
| | [`ExperimentalResourceDetector`](#experimentalresourcedetector) | unknown | | * `container`: unknown
* `host`: unknown
* `process`: unknown
* `service`: unknown
| | [`ExperimentalServiceResourceDetector`](#experimentalserviceresourcedetector) | unknown | | | +| [`ExperimentalSpanParent`](#experimentalspanparent) | unknown | | * `local`: unknown
* `none`: unknown
* `remote`: unknown
| | [`ExperimentalTracerConfig`](#experimentaltracerconfig) | unknown | | * `disabled`: unknown
| | [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | unknown | | * `default_config`: unknown
* `tracers`: unknown
| | [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | unknown | | * `config`: unknown
* `name`: unknown
| diff --git a/schema/meta_schema_language_cpp.yaml b/schema/meta_schema_language_cpp.yaml index 08ddbf6c..1fa44c94 100644 --- a/schema/meta_schema_language_cpp.yaml +++ b/schema/meta_schema_language_cpp.yaml @@ -165,6 +165,9 @@ typeSupportStatuses: - type: SpanExporter status: supported propertyOverrides: [] + - type: SpanKind + status: unknown + enumOverrides: [] - type: SpanLimits status: supported propertyOverrides: [] @@ -207,6 +210,18 @@ typeSupportStatuses: - type: ExperimentalComposableProbabilitySampler status: unknown propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSampler + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRule + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributePatterns + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributeValues + status: unknown + propertyOverrides: [] - type: ExperimentalComposableSampler status: unknown propertyOverrides: [] @@ -292,6 +307,9 @@ typeSupportStatuses: - type: ExperimentalServiceResourceDetector status: not_implemented propertyOverrides: [] + - type: ExperimentalSpanParent + status: unknown + enumOverrides: [] - type: ExperimentalTracerConfig status: not_implemented propertyOverrides: [] diff --git a/schema/meta_schema_language_go.yaml b/schema/meta_schema_language_go.yaml index 914a1032..567ec864 100644 --- a/schema/meta_schema_language_go.yaml +++ b/schema/meta_schema_language_go.yaml @@ -165,6 +165,9 @@ typeSupportStatuses: - type: SpanExporter status: unknown propertyOverrides: [] + - type: SpanKind + status: unknown + enumOverrides: [] - type: SpanLimits status: unknown propertyOverrides: [] @@ -207,6 +210,18 @@ typeSupportStatuses: - type: ExperimentalComposableProbabilitySampler status: unknown propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSampler + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRule + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributePatterns + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributeValues + status: unknown + propertyOverrides: [] - type: ExperimentalComposableSampler status: unknown propertyOverrides: [] @@ -288,6 +303,9 @@ typeSupportStatuses: - type: ExperimentalServiceResourceDetector status: unknown propertyOverrides: [] + - type: ExperimentalSpanParent + status: unknown + enumOverrides: [] - type: ExperimentalTracerConfig status: unknown propertyOverrides: [] diff --git a/schema/meta_schema_language_java.yaml b/schema/meta_schema_language_java.yaml index 3e032fa6..6070f423 100644 --- a/schema/meta_schema_language_java.yaml +++ b/schema/meta_schema_language_java.yaml @@ -197,6 +197,9 @@ typeSupportStatuses: - type: SpanExporter status: supported propertyOverrides: [] + - type: SpanKind + status: unknown + enumOverrides: [] - type: SpanLimits status: supported propertyOverrides: [] @@ -241,6 +244,18 @@ typeSupportStatuses: - type: ExperimentalComposableProbabilitySampler status: unknown propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSampler + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRule + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributePatterns + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributeValues + status: unknown + propertyOverrides: [] - type: ExperimentalComposableSampler status: unknown propertyOverrides: [] @@ -356,6 +371,9 @@ typeSupportStatuses: - type: ExperimentalServiceResourceDetector status: supported propertyOverrides: [] + - type: ExperimentalSpanParent + status: unknown + enumOverrides: [] - type: ExperimentalTracerConfig status: supported propertyOverrides: [] diff --git a/schema/meta_schema_language_js.yaml b/schema/meta_schema_language_js.yaml index 1de362a1..ab067f38 100644 --- a/schema/meta_schema_language_js.yaml +++ b/schema/meta_schema_language_js.yaml @@ -165,6 +165,9 @@ typeSupportStatuses: - type: SpanExporter status: unknown propertyOverrides: [] + - type: SpanKind + status: unknown + enumOverrides: [] - type: SpanLimits status: unknown propertyOverrides: [] @@ -207,6 +210,18 @@ typeSupportStatuses: - type: ExperimentalComposableProbabilitySampler status: unknown propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSampler + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRule + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributePatterns + status: unknown + propertyOverrides: [] + - type: ExperimentalComposableRuleBasedSamplerRuleAttributeValues + status: unknown + propertyOverrides: [] - type: ExperimentalComposableSampler status: unknown propertyOverrides: [] @@ -288,6 +303,9 @@ typeSupportStatuses: - type: ExperimentalServiceResourceDetector status: unknown propertyOverrides: [] + - type: ExperimentalSpanParent + status: unknown + enumOverrides: [] - type: ExperimentalTracerConfig status: unknown propertyOverrides: [] diff --git a/schema/tracer_provider.yaml b/schema/tracer_provider.yaml index 8027ee5e..a28ab970 100644 --- a/schema/tracer_provider.yaml +++ b/schema/tracer_provider.yaml @@ -24,6 +24,34 @@ properties: required: - processors $defs: + SpanKind: + type: + - string + - "null" + enum: + - internal + - server + - client + - producer + - consumer + enumDescriptions: + internal: internal, an internal span. + server: server, a server span. + client: client, a client span. + producer: producer, a producer span. + consumer: consumer, a consumer span. + ExperimentalSpanParent: + type: + - string + - "null" + enum: + - none + - remote + - local + enumDescriptions: + none: none, no parent, i.e., the trace root. + remote: remote, a remote parent. + local: local, a local parent. BatchSpanProcessor: type: object additionalProperties: false @@ -250,6 +278,108 @@ $defs: description: | Configure ratio. defaultBehavior: 1.0 is used + ExperimentalComposableRuleBasedSampler: + type: + - object + - 'null' + additionalProperties: false + properties: + rules: + type: + - array + - 'null' + items: + "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRule" + description: | + The rules for the sampler, matched in order. If no rules match, the span is not sampled. + defaultBehavior: no span is sampled + ExperimentalComposableRuleBasedSamplerRule: + type: object + description: | + A rule for ExperimentalComposableRuleBasedSampler. A rule can have multiple match conditions - the sampler will be applied if all match. + If no conditions are specified, the rule matches all spans that reach it. + additionalProperties: false + properties: + attribute_values: + "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRuleAttributeValues" + description: | + Values to match against a single attribute. Non-string attributes are matched using their string representation: + for example, a value of "404" would match the http.response.status_code 404. For array attributes, if any + item matches, it is considered a match. + defaultBehavior: ignore + attribute_patterns: + "$ref": "#/$defs/ExperimentalComposableRuleBasedSamplerRuleAttributePatterns" + description: | + Patterns to match against a single attribute. Non-string attributes are matched using their string representation: + for example, a pattern of "4*" would match any http.response.status_code in 400-499. For array attributes, if any + item matches, it is considered a match. + defaultBehavior: ignore + span_kinds: + type: array + minItems: 1 + items: + "$ref": "#/$defs/SpanKind" + description: The span kinds to match. If the span's kind matches any of these, it matches. + defaultBehavior: ignore + parent: + type: array + minItems: 1 + items: + "$ref": "#/$defs/ExperimentalSpanParent" + description: The parent span types to match. + defaultBehavior: ignore + sampler: + "$ref": "#/$defs/ExperimentalComposableSampler" + description: The sampler to use for matching spans. + required: + - sampler + ExperimentalComposableRuleBasedSamplerRuleAttributeValues: + type: object + additionalProperties: false + properties: + key: + type: string + description: The attribute key to match against. + values: + type: array + minItems: 1 + items: + type: string + description: The attribute values to match against. If the attribute's value matches any of these, it matches. + required: + - key + - values + ExperimentalComposableRuleBasedSamplerRuleAttributePatterns: + type: object + additionalProperties: false + properties: + key: + type: string + description: The attribute key to match against. + included: + type: array + minItems: 1 + items: + type: string + description: | + Configure list of value patterns to include. + Values are evaluated to match as follows: + * If the value exactly matches. + * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + defaultBehavior: all values are included + excluded: + type: array + minItems: 1 + items: + type: string + description: | + Configure list of value patterns to exclude. Applies after .included (i.e. excluded has higher priority than included). + Values are evaluated to match as follows: + * If the value exactly matches. + * If the value matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none. + defaultBehavior: .included attributes are included + required: + - key ExperimentalComposableSampler: type: object additionalProperties: @@ -275,6 +405,10 @@ $defs: $ref: "#/$defs/ExperimentalComposableProbabilitySampler" description: Configure sampler to be probability. defaultBehavior: ignore + rule_based: + $ref: "#/$defs/ExperimentalComposableRuleBasedSampler" + description: Configure sampler to be rule_based. + defaultBehavior: ignore SimpleSpanProcessor: type: object additionalProperties: false