Skip to content

Commit be9d57d

Browse files
committed
General cleanup.
- added references to yaml schema - simplified propagators
1 parent a020ef9 commit be9d57d

File tree

55 files changed

+145
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+145
-235
lines changed

sdk/include/opentelemetry/sdk/configuration/aggregation_configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ namespace sdk
1313
namespace configuration
1414
{
1515

16+
// YAML-SCHEMA: schema/meter_provider.json
17+
// YAML-NODE: aggregation
1618
class AggregationConfiguration
1719
{
1820
public:

sdk/include/opentelemetry/sdk/configuration/always_off_sampler_configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ namespace sdk
1313
namespace configuration
1414
{
1515

16+
// YAML-SCHEMA: schema/tracer_provider.json
17+
// YAML-NODE: always_off
1618
class AlwaysOffSamplerConfiguration : public SamplerConfiguration
1719
{
1820
public:

sdk/include/opentelemetry/sdk/configuration/always_on_sampler_configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ namespace sdk
1313
namespace configuration
1414
{
1515

16+
// YAML-SCHEMA: schema/tracer_provider.json
17+
// YAML-NODE: always_on
1618
class AlwaysOnSamplerConfiguration : public SamplerConfiguration
1719
{
1820
public:

sdk/include/opentelemetry/sdk/configuration/attribute_limit_configuration.h renamed to sdk/include/opentelemetry/sdk/configuration/attribute_limits_configuration.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ namespace sdk
1313
namespace configuration
1414
{
1515

16-
// REF: schema/opentelemetry_configuration.json
17-
class AttributeLimitConfiguration
16+
// YAML-SCHEMA: schema/opentelemetry_configuration.json
17+
// YAML-NODE: AttributeLimits
18+
class AttributeLimitsConfiguration
1819
{
1920
public:
2021
size_t attribute_value_length_limit;

sdk/include/opentelemetry/sdk/configuration/attributes_configuration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ namespace sdk
1313
namespace configuration
1414
{
1515

16+
// YAML-SCHEMA: schema/resource.json
17+
// YAML-NODE: AttributeNameValue
18+
// FIXME: Name/Value/Type
1619
class AttributesConfiguration
1720
{
1821
public:

sdk/include/opentelemetry/sdk/configuration/base2_exponential_bucket_histogram_aggregation_configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ namespace sdk
1414
namespace configuration
1515
{
1616

17+
// YAML-SCHEMA: schema/meter_provider.json
18+
// YAML-NODE: base2_exponential_bucket_histogram
1719
class Base2ExponentialBucketHistogramAggregationConfiguration : public AggregationConfiguration
1820
{
1921
public:

sdk/include/opentelemetry/sdk/configuration/batch_log_record_processor_configuration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ namespace sdk
1414
namespace configuration
1515
{
1616

17-
// REF: schema/logger_provider.json
17+
// YAML-SCHEMA: schema/logger_provider.json
18+
// YAML-NODE: BatchLogRecordProcessor
1819
class BatchLogRecordProcessorConfiguration : public LogRecordProcessorConfiguration
1920
{
2021
public:

sdk/include/opentelemetry/sdk/configuration/batch_span_processor_configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ namespace sdk
1414
namespace configuration
1515
{
1616

17+
// YAML-SCHEMA: schema/tracer_provider.json
18+
// YAML-NODE: BatchSpanProcessor
1719
class BatchSpanProcessorConfiguration : public SpanProcessorConfiguration
1820
{
1921
public:

sdk/include/opentelemetry/sdk/configuration/composite_propagator_configuration.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

sdk/include/opentelemetry/sdk/configuration/configuration.h

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <string>
77

8-
#include "opentelemetry/sdk/configuration/attribute_limit_configuration.h"
8+
#include "opentelemetry/sdk/configuration/attribute_limits_configuration.h"
99
#include "opentelemetry/sdk/configuration/document.h"
1010
#include "opentelemetry/sdk/configuration/logger_provider_configuration.h"
1111
#include "opentelemetry/sdk/configuration/meter_provider_configuration.h"
@@ -14,13 +14,35 @@
1414
#include "opentelemetry/sdk/configuration/tracer_provider_configuration.h"
1515
#include "opentelemetry/version.h"
1616

17+
/*
18+
* General notes about configuration classes.
19+
*
20+
* Each Yaml node that exists in the yaml schema,
21+
* as defined by https://github.com/open-telemetry/opentelemetry-configuration
22+
* is represented by a C++ class.
23+
* Special comments are used to relate the C++ class to
24+
* the Yaml node it represents.
25+
*
26+
* YAML-SCHEMA: points to the relevant file within the
27+
* opentelemetry-configuration repository
28+
* YAML-NODE: points to the relevant node within the file.
29+
*
30+
* For example,
31+
* C++ class opentelemetry::sdk::configuration::Configuration
32+
* corresponds to
33+
* Yaml node OpenTelemetryConfiguration,
34+
* in file
35+
* https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema/opentelemetry_configuration.json
36+
*/
37+
1738
OPENTELEMETRY_BEGIN_NAMESPACE
1839
namespace sdk
1940
{
2041
namespace configuration
2142
{
2243

23-
// REF: schema/opentelemetry_configuration.json
44+
// YAML-SCHEMA: schema/opentelemetry_configuration.json
45+
// YAML-NODE: OpenTelemetryConfiguration
2446
class Configuration
2547
{
2648
public:
@@ -30,7 +52,7 @@ class Configuration
3052
std::string file_format;
3153
bool disabled{false};
3254

33-
std::unique_ptr<AttributeLimitConfiguration> attribute_limits;
55+
std::unique_ptr<AttributeLimitsConfiguration> attribute_limits;
3456
std::unique_ptr<LoggerProviderConfiguration> logger_provider;
3557
std::unique_ptr<MeterProviderConfiguration> meter_provider;
3658
std::unique_ptr<PropagatorConfiguration> propagator;

0 commit comments

Comments
 (0)