Skip to content

Sample on root span level #3767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Nov 14, 2024
Merged

Sample on root span level #3767

merged 13 commits into from
Nov 14, 2024

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Nov 13, 2024

  • for spans that have a local parent (i.e., non-root spans/transactions), just inherit the sampling decision from the parent
  • update some tests

Closes #3766

Copy link

codecov bot commented Nov 13, 2024

❌ 1594 Tests Failed:

Tests completed Failed Passed Skipped
19899 1594 18305 4412
View the top 1 failed tests by shortest run time
tests.test_utils test_datetime_from_isoformat[2021-01-01T00:00:00.000000-00:00-expected_output4]
Stack Traces | 0.001s run time
tests/test_utils.py:109: in test_datetime_from_isoformat
    assert datetime_from_isoformat(input_str) == expected_output, input_str
E   NameError: name 'datetime_from_isoformat' is not defined
View the full list of 2 ❄️ flaky tests
tests.test_utils test_datetime_from_isoformat[2021-01-01T00:00:00.000000-0000-expected_output6]

Flake rate in main: 43.86% (Passed 32 times, Failed 25 times)

Stack Traces | 0.001s run time
tests/test_utils.py:109: in test_datetime_from_isoformat
    assert datetime_from_isoformat(input_str) == expected_output, input_str
E   NameError: name 'datetime_from_isoformat' is not defined
tests.test_scope test_with_isolation_scope_data

Flake rate in main: 99.09% (Passed 2 times, Failed 218 times)

Stack Traces | 0.001s run time
tests/test_scope.py:387: in test_with_isolation_scope_data
    assert scope._tags == {"before_isolation_scope": 1}
E   AssertionError: assert {} == {'before_isolation_scope': 1}
E     
E     Right contains 1 more item:
E     {'before_isolation_scope': 1}
E     
E     Full diff:
E     + {}
E     - {
E     -     'before_isolation_scope': 1,
E     - }

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

@sentrivana
Copy link
Contributor Author

@sl0thentr0py Removed parent_sampled and updated the tests a bit more, please recheck

name="dogpark", parent_sampled=parent_sampling_decision
)
assert transaction.sampled is parent_sampling_decision
with start_span(name="catpark", sampled=parent_sampling_decision):
Copy link
Member

Choose a reason for hiding this comment

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

this test should mirror the one above where you added the continue_trace

@sentrivana sentrivana merged commit ff7e134 into potel-base Nov 14, 2024
26 of 118 checks passed
@sentrivana sentrivana deleted the ivana/potel/fix-sampler branch November 14, 2024 10:58
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