[CONFIGURATION] SDK default component builder libraries and example - #4367
Conversation
| endif() | ||
|
|
||
| if(BUILD_TESTING) | ||
| add_test(NAME examples.example_yaml COMMAND "$<TARGET_FILE:example_yaml>") |
There was a problem hiding this comment.
The example is now tested here against three different yaml files covering all the default builders, extension builders, and composite sampler. These tests now fail on non-zero returns (thanks to the --test arg) or if the example logs an error.
|
For smooth integration - this PR depends on several others and review/merge of these should be completed first: |
…lace the default builders. add the sdk-default.yaml to the example's tests
| PRIVATE opentelemetry-cpp::prometheus_exporter_builder) | ||
| endif() | ||
|
|
||
| if(DEFINED OPENTELEMETRY_BUILD_DLL) |
There was a problem hiding this comment.
The DLL build is not supported or tested for OTLP or Configuration classes (most are missing the required exports). Removing this to make the example easier to understand by moving the important config targets to the top of the file.
…ite sampler builder and use it in the sdk builder. Enforce a max sampler depth for composable samplers
…e sampler config class and separating the composable config vistor from the top level sampler config visitor. cleanup the sdk builder to use the new composable config visitor.
| { | ||
| public: | ||
| // Returns a Registry pre-populated with all default signal builders. | ||
| static std::shared_ptr<Registry> Create(); |
There was a problem hiding this comment.
nit: a Create() method should return a unique_ptr, not a shared_ptr. It is then to the caller to assign this unique_ptr to a shared_ptr if it wants it shared.
There was a problem hiding this comment.
Thanks I'll follow up with this one separately. It will impact all the call sites to the SdkBuilder and ConfiguredSdk::Create.
marcalff
left a comment
There was a problem hiding this comment.
Excellent work.
See minor nit, ok to merge.
Contributes to #4352
Create configuration builder libraries per signal and update SdkBuilder to use them.
This brings a breaking change to how users create a default registry populated with SDK component builders.
Changes
opentelemetry-cpp::configuration_logs_builders(9846e83)opentelemetry-cpp::configuration_metrics_builders(f3328f3)opentelemetry-cpp::configuration_trace_builders(7977068)openetelemetry-cpp::configuration_registry_factory(d077f5f)For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes