1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-04-13 11:30:31 +02:00

Change default Sampler to ParentOrElse(AlwaysOn) (#989)

* Change default Sampler to ParentOrElse(AlwaysOn)

* add note to changelog
This commit is contained in:
MitchellDumovic 2020-07-29 19:10:12 -07:00 committed by GitHub
parent fa883d426b
commit 12992106de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -64,6 +64,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948)
### Changed
- Changed the default Sampler to `ParentOrElse(AlwaysOn)`. (#989)
### Removed
- Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943)

View File

@ -67,7 +67,7 @@ func NewProvider(opts ...ProviderOption) (*Provider, error) {
namedTracer: make(map[instrumentation.Library]*tracer),
}
tp.config.Store(&Config{
DefaultSampler: AlwaysSample(),
DefaultSampler: ParentSample(AlwaysSample()),
IDGenerator: defIDGenerator(),
MaxAttributesPerSpan: DefaultMaxAttributesPerSpan,
MaxEventsPerSpan: DefaultMaxEventsPerSpan,