Skip to content

Conversation

jpkrohling
Copy link
Member

@jpkrohling jpkrohling commented Dec 4, 2024

Signed-off-by: Juraci Paixão Kröhling [email protected]

Description

The PR #33671 aligned the behavior of the composite policy with the behavior of the processor as a whole, but in the process, caused a breaking change to users relying on exception lists, like one of the examples from the readme. Given that this is affecting a good number of users, we are reverting that behavior, so that we can have more discussions and a better solution.

Link to tracking issue

Fixes #34085

…continue processing

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@jpkrohling jpkrohling requested a review from a team as a code owner December 4, 2024 16:14
@github-actions github-actions bot added the processor/tailsampling Tail sampling processor label Dec 4, 2024
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
@evan-bradley evan-bradley merged commit dd600c1 into open-telemetry:main Dec 4, 2024
158 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 4, 2024
shivanthzen pushed a commit to shivanthzen/opentelemetry-collector-contrib that referenced this pull request Dec 5, 2024
ZenoCC-Peng pushed a commit to ZenoCC-Peng/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2024
sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this pull request Dec 17, 2024
AkhigbeEromo pushed a commit to sematext/opentelemetry-collector-contrib that referenced this pull request Jan 13, 2025
zeck-ops pushed a commit to zeck-ops/opentelemetry-collector-contrib that referenced this pull request Apr 23, 2025
atoulme pushed a commit that referenced this pull request Apr 29, 2025
#### Description

This pull-request introduces a new policy type to explicitly drop traces
regardless of other policy decisions. The new `drop` policy type behaves
much like an `and`, however, it returns a `Dropped` decision when all of
its policies return `Sampled`. A `Dropped` decision takes precedence
over all others. The `Dropped` decision is not new, however, it was
unused and therefor safe to use for this purpose. This new policy type
is very **approachable** and capable.

This new policy type can be used to replace the top-level (not within an
`and` policy) use of `invert_match` to control the final sampling
decision. We could deprecate the current `invert_match` top-level
decision logic. The string, numeric, and boolean filter policies still
support `invert_match`, which continues to flip the decision for the
individual policy. Let `invert_match` be simple.

Example:

```
{
    name: drop-it-like-its-hot,
    type: drop,
    drop: {
        drop_sub_policy: 
        [
            {
                name: do-not-sample,
                type: boolean_attribute,
                boolean_attribute: { key: app.do_not_sample, value: true },
            }
        ]
    }
}
```

This is a reduced version of a previous PR
#37760

#### Related Issues

-
#36673
-
#33656
-
#36795
-
#34296
-
#34085
-
#29637
-
#27049
- Probably more 😅

---------

Signed-off-by: Sean Porter <[email protected]>
vincentfree pushed a commit to ing-bank/opentelemetry-collector-contrib that referenced this pull request May 6, 2025
#### Description

This pull-request introduces a new policy type to explicitly drop traces
regardless of other policy decisions. The new `drop` policy type behaves
much like an `and`, however, it returns a `Dropped` decision when all of
its policies return `Sampled`. A `Dropped` decision takes precedence
over all others. The `Dropped` decision is not new, however, it was
unused and therefor safe to use for this purpose. This new policy type
is very **approachable** and capable.

This new policy type can be used to replace the top-level (not within an
`and` policy) use of `invert_match` to control the final sampling
decision. We could deprecate the current `invert_match` top-level
decision logic. The string, numeric, and boolean filter policies still
support `invert_match`, which continues to flip the decision for the
individual policy. Let `invert_match` be simple.

Example:

```
{
    name: drop-it-like-its-hot,
    type: drop,
    drop: {
        drop_sub_policy: 
        [
            {
                name: do-not-sample,
                type: boolean_attribute,
                boolean_attribute: { key: app.do_not_sample, value: true },
            }
        ]
    }
}
```

This is a reduced version of a previous PR
open-telemetry#37760

#### Related Issues

-
open-telemetry#36673
-
open-telemetry#33656
-
open-telemetry#36795
-
open-telemetry#34296
-
open-telemetry#34085
-
open-telemetry#29637
-
open-telemetry#27049
- Probably more 😅

---------

Signed-off-by: Sean Porter <[email protected]>
atoulme pushed a commit that referenced this pull request May 9, 2025
#### Description

Users can now use the newly added [Drop policy
type](#39668)
to explicitly drop (not sample) specific traces regardless of other
policy decisions. This pull-request deprecates the invert sample
decisions.
 
This pull-request introduces a feature gate/flag,
`processor.tailsamplingprocessor.disableinvertdecisions`, to disable the
invert sampling decisions. The gate/flag influences the underlying
policy evaluation for simplicity. With the gate/flag enabled, the
string, numeric, and boolean filter policies still support
`invert_match`, which continues to flip the decision for the individual
policy (only `Sampled` and `NotSampled`). Letting `invert_match` be
simple.

#### Related Issues

-
#36673
-
#33656
-
#36795
-
#34296
-
#34085
-
#29637
-
#27049
- Probably more 😅

---------

Signed-off-by: Sean Porter <[email protected]>
vincentfree pushed a commit to ing-bank/opentelemetry-collector-contrib that referenced this pull request May 20, 2025
#### Description

This pull-request introduces a new policy type to explicitly drop traces
regardless of other policy decisions. The new `drop` policy type behaves
much like an `and`, however, it returns a `Dropped` decision when all of
its policies return `Sampled`. A `Dropped` decision takes precedence
over all others. The `Dropped` decision is not new, however, it was
unused and therefor safe to use for this purpose. This new policy type
is very **approachable** and capable.

This new policy type can be used to replace the top-level (not within an
`and` policy) use of `invert_match` to control the final sampling
decision. We could deprecate the current `invert_match` top-level
decision logic. The string, numeric, and boolean filter policies still
support `invert_match`, which continues to flip the decision for the
individual policy. Let `invert_match` be simple.

Example:

```
{
    name: drop-it-like-its-hot,
    type: drop,
    drop: {
        drop_sub_policy: 
        [
            {
                name: do-not-sample,
                type: boolean_attribute,
                boolean_attribute: { key: app.do_not_sample, value: true },
            }
        ]
    }
}
```

This is a reduced version of a previous PR
open-telemetry#37760

#### Related Issues

-
open-telemetry#36673
-
open-telemetry#33656
-
open-telemetry#36795
-
open-telemetry#34296
-
open-telemetry#34085
-
open-telemetry#29637
-
open-telemetry#27049
- Probably more 😅

---------

Signed-off-by: Sean Porter <[email protected]>
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
…metry#39833)

#### Description

Users can now use the newly added [Drop policy
type](open-telemetry#39668)
to explicitly drop (not sample) specific traces regardless of other
policy decisions. This pull-request deprecates the invert sample
decisions.
 
This pull-request introduces a feature gate/flag,
`processor.tailsamplingprocessor.disableinvertdecisions`, to disable the
invert sampling decisions. The gate/flag influences the underlying
policy evaluation for simplicity. With the gate/flag enabled, the
string, numeric, and boolean filter policies still support
`invert_match`, which continues to flip the decision for the individual
policy (only `Sampled` and `NotSampled`). Letting `invert_match` be
simple.

#### Related Issues

-
open-telemetry#36673
-
open-telemetry#33656
-
open-telemetry#36795
-
open-telemetry#34296
-
open-telemetry#34085
-
open-telemetry#29637
-
open-telemetry#27049
- Probably more 😅

---------

Signed-off-by: Sean Porter <[email protected]>
dd-jasminesun pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Jun 23, 2025
…metry#39833)

#### Description

Users can now use the newly added [Drop policy
type](open-telemetry#39668)
to explicitly drop (not sample) specific traces regardless of other
policy decisions. This pull-request deprecates the invert sample
decisions.
 
This pull-request introduces a feature gate/flag,
`processor.tailsamplingprocessor.disableinvertdecisions`, to disable the
invert sampling decisions. The gate/flag influences the underlying
policy evaluation for simplicity. With the gate/flag enabled, the
string, numeric, and boolean filter policies still support
`invert_match`, which continues to flip the decision for the individual
policy (only `Sampled` and `NotSampled`). Letting `invert_match` be
simple.

#### Related Issues

-
open-telemetry#36673
-
open-telemetry#33656
-
open-telemetry#36795
-
open-telemetry#34296
-
open-telemetry#34085
-
open-telemetry#29637
-
open-telemetry#27049
- Probably more 😅

---------

Signed-off-by: Sean Porter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

processor/tailsampling Tail sampling processor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processor/tailsampling] invert_match precedence

2 participants