Skip to content

Change default Sampler to ParentOrElse(AlwaysOn) #960

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
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Changed default Sampler to `ParentOrElse(AlwaysOn)`

## Version 0.11b0

Released 2020-07-28
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ def use_span(
class TracerProvider(trace_api.TracerProvider):
def __init__(
self,
sampler: sampling.Sampler = trace_api.sampling.ALWAYS_ON,
sampler: sampling.Sampler = trace_api.sampling.DEFAULT_ON,
resource: Resource = Resource.create_empty(),
shutdown_on_exit: bool = True,
active_span_processor: Union[
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-sdk/tests/trace/test_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ def test_start_as_current_span_explicit(self):
trace_id=0x000000000000000000000000DEADBEEF,
span_id=0x00000000DEADBEF0,
is_remote=False,
trace_flags=trace_api.TraceFlags(trace_api.TraceFlags.SAMPLED),
)

self.assertEqual(trace_api.get_current_span(), trace_api.INVALID_SPAN)
Expand Down