Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Increment the:
when building the SDK, with exclude patterns taking precedence.
[#3546](https://github.com/open-telemetry/opentelemetry-cpp/issues/3546)

* [CONFIGURATION] Update registry factory to return a unique_ptr
[#4487](https://github.com/open-telemetry/opentelemetry-cpp/pull/4487)

* [CONFIGURATION] Add support for the composite sampler configuration
(programmatic and from yaml)
([#4366](https://github.com/open-telemetry/opentelemetry-cpp/pull/4366))
Expand Down
2 changes: 1 addition & 1 deletion install/test/src/test_sdk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ TEST_F(SdkInstallTest, ConfigurationCoreCheck)
{
const std::string propagator_name{"noop"};

auto registry = config_sdk::RegistryFactory::Create();
std::shared_ptr<config_sdk::Registry> registry = config_sdk::RegistryFactory::Create();
registry->SetConsoleSpanBuilder(std::make_unique<NoopConsoleSpanBuilder>());
registry->SetConsoleLogRecordBuilder(std::make_unique<NoopConsoleLogRecordBuilder>());
registry->SetConsolePushMetricExporterBuilder(std::make_unique<NoopConsolePushMetricBuilder>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class RegistryFactory
{
public:
// Returns a Registry pre-populated with all default signal builders.
static std::shared_ptr<Registry> Create();
static std::unique_ptr<Registry> Create();
};

} // namespace configuration
Expand Down
4 changes: 2 additions & 2 deletions sdk/src/configuration/registry_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ namespace sdk
namespace configuration
{

std::shared_ptr<Registry> RegistryFactory::Create()
std::unique_ptr<Registry> RegistryFactory::Create()
{
auto registry = std::make_shared<Registry>();
auto registry = std::make_unique<Registry>();
RegisterDefaultTraceBuilders(registry.get());
RegisterDefaultMetricsBuilders(registry.get());
RegisterDefaultLogsBuilders(registry.get());
Expand Down
Loading