Skip to content

Conversation

@jack-berg
Copy link
Member

Nothing important for rc3.

@jack-berg jack-berg requested a review from a team as a code owner December 11, 2025 19:59
- array
- 'null'
type: array
minItems: 1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed this while implementing and seeing formatting look weird in schema-docs.md

Image

.rules is not required, but if it is present, it should be non null and have at least 1 item.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR:

Screenshot 2025-12-11 at 2 13 59 PM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I thought it could be fine to allow empty rules, for example if the config is programatically generated based on something else but ends up with []. Of course, such a generator could be sophisticated enough to swap in always_off for such a scenario so ok with either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, such a generator could be sophisticated enough to swap in always_off

Exactly. Given that we can always loosen constraints but not add them, I'd rather start stricter and loosen in response to feedback.

The rules for the sampler, matched in order.
Each rule can have multiple match conditions. All conditions must match for the rule to match.
If no conditions are specified, the rule matches all spans that reach it.
If no rules match, the span is not sampled.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is documented in kitchen-sink.yaml but this behavior is important to both implementers and users and so should be part of the schema via description.

}
}
},
"ExperimentalComposableRuleBasedSamplerRule": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the help @jack-berg! I agree with your open-telemetry/opentelemetry-java#7861 (comment) missed that case when reasoning out the use cases. Should we have a predicates array of these that are ANDed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 tracking in #464

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