Skip to content
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

Add only_if_parent option to POTelSpan and use it in integrations #3748

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

sl0thentr0py
Copy link
Member

If this option is on, we will only create a new underlying otel span if there's an active valid parent, otherwise we will just return an invalid NonRecordingSpan (INVALID_SPAN).

All internal integration child start_span calls have been modified so that now we will only create spans if there is an active root span (transaction) active.

If this option is on, we will only create a new underlying otel span if
there's an active valid parent, otherwise we will just return an invalid
`NonRecordingSpan` (`INVALID_SPAN`).

All internal integration child `start_span` calls have been modified so that
now we will only create spans if there is an active root span
(transaction) active.
Copy link

codecov bot commented Nov 7, 2024

❌ 1689 Tests Failed:

Tests completed Failed Passed Skipped
20548 1689 18859 4475
View the top 3 failed tests by shortest run time
tests.test_scope test_with_isolation_scope_data
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     - }
tests.test_utils test_datetime_from_isoformat[2021-01-01T00:00:00.000000-0000-expected_output6]
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_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

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

Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

Thanks for this! Lookin' good.

@antonpirker antonpirker merged commit 632dc68 into potel-base Nov 11, 2024
23 of 125 checks passed
@antonpirker antonpirker deleted the neel/potel/only-if-parent branch November 11, 2024 09:39
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