Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#include "opentelemetry/sdk/configuration/double_attribute_value_configuration.h"
#include "opentelemetry/sdk/configuration/drop_aggregation_configuration.h"
#include "opentelemetry/sdk/configuration/exemplar_filter.h"
#include "opentelemetry/sdk/configuration/experimental_logger_configurator_configuration.h"
#include "opentelemetry/sdk/configuration/experimental_meter_configurator_configuration.h"
#include "opentelemetry/sdk/configuration/experimental_tracer_configurator_configuration.h"
#include "opentelemetry/sdk/configuration/explicit_bucket_histogram_aggregation_configuration.h"
#include "opentelemetry/sdk/configuration/extension_log_record_exporter_configuration.h"
#include "opentelemetry/sdk/configuration/extension_log_record_processor_configuration.h"
Expand Down Expand Up @@ -164,6 +167,16 @@ class ConfigurationParser
std::unique_ptr<LoggerProviderConfiguration> ParseLoggerProviderConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

ExperimentalLoggerConfigConfiguration ParseExperimentalLoggerConfigConfiguration(
const std::unique_ptr<DocumentNode> &node) const;
Comment on lines +170 to +171
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some global naming comments, that apply everywhere:

The yaml schema type is ExperimentalFoo, but the corresponding C++ code should not say Experimental all the time.

Please change:

  • the file names
  • the classes names
  • the method names

to remove the Experimental part.


ExperimentalLoggerMatcherAndConfigConfiguration
ParseExperimentalLoggerMatcherAndConfigConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

std::unique_ptr<ExperimentalLoggerConfiguratorConfiguration>
ParseExperimentalLoggerConfiguratorConfiguration(const std::unique_ptr<DocumentNode> &node) const;

DefaultHistogramAggregation ParseDefaultHistogramAggregation(
const std::unique_ptr<DocumentNode> &node,
const std::string &name) const;
Expand Down Expand Up @@ -266,6 +279,16 @@ class ConfigurationParser
std::unique_ptr<MeterProviderConfiguration> ParseMeterProviderConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

ExperimentalMeterConfigConfiguration ParseExperimentalMeterConfigConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

ExperimentalMeterMatcherAndConfigConfiguration
ParseExperimentalMeterMatcherAndConfigConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

std::unique_ptr<ExperimentalMeterConfiguratorConfiguration>
ParseExperimentalMeterConfiguratorConfiguration(const std::unique_ptr<DocumentNode> &node) const;

std::unique_ptr<PropagatorConfiguration> ParsePropagatorConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

Expand Down Expand Up @@ -336,6 +359,16 @@ class ConfigurationParser
std::unique_ptr<TracerProviderConfiguration> ParseTracerProviderConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

ExperimentalTracerConfigConfiguration ParseExperimentalTracerConfigConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

ExperimentalTracerMatcherAndConfigConfiguration
ParseExperimentalTracerMatcherAndConfigConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

std::unique_ptr<ExperimentalTracerConfiguratorConfiguration>
ParseExperimentalTracerConfiguratorConfiguration(const std::unique_ptr<DocumentNode> &node) const;

std::unique_ptr<StringAttributeValueConfiguration> ParseStringAttributeValueConfiguration(
const std::unique_ptr<DocumentNode> &node) const;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/logger_provider.json
// YAML-NODE: ExperimentalLoggerConfig
class ExperimentalLoggerConfigConfiguration
{
public:
bool disabled{false};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yaml attribute has been renamed to enabled in the spec, in a recent change:

Rename to enabled.

};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <vector>

#include "opentelemetry/sdk/configuration/experimental_logger_config_configuration.h"
#include "opentelemetry/sdk/configuration/experimental_logger_matcher_and_config_configuration.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/logger_provider.json
// YAML-NODE: ExperimentalLoggerConfigurator
class ExperimentalLoggerConfiguratorConfiguration
{
public:
ExperimentalLoggerConfigConfiguration default_config;
std::vector<ExperimentalLoggerMatcherAndConfigConfiguration> loggers;
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <string>

#include "opentelemetry/sdk/configuration/experimental_logger_config_configuration.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/logger_provider.json
// YAML-NODE: ExperimentalLoggerMatcherAndConfig
class ExperimentalLoggerMatcherAndConfigConfiguration
{
public:
std::string name;
ExperimentalLoggerConfigConfiguration config;
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/meter_provider.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the meter config here says// YAML-SCHEMA: schema/meter_provider.yaml while tracer/logger headers say .json. Should be consistent across all three signals.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be yaml everywhere.

// YAML-NODE: ExperimentalMeterConfig
class ExperimentalMeterConfigConfiguration
{
public:
bool disabled{false};
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <vector>

#include "opentelemetry/sdk/configuration/experimental_meter_config_configuration.h"
#include "opentelemetry/sdk/configuration/experimental_meter_matcher_and_config_configuration.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/meter_provider.yaml
// YAML-NODE: ExperimentalMeterConfigurator
class ExperimentalMeterConfiguratorConfiguration
{
public:
ExperimentalMeterConfigConfiguration default_config;
std::vector<ExperimentalMeterMatcherAndConfigConfiguration> meters;
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <string>

#include "opentelemetry/sdk/configuration/experimental_meter_config_configuration.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/meter_provider.yaml
// YAML-NODE: ExperimentalMeterMatcherAndConfig
class ExperimentalMeterMatcherAndConfigConfiguration
{
public:
std::string name;
ExperimentalMeterConfigConfiguration config;
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/tracer_provider.json
// YAML-NODE: ExperimentalTracerConfig
class ExperimentalTracerConfigConfiguration
{
public:
bool disabled{false};
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <vector>

#include "opentelemetry/sdk/configuration/experimental_tracer_config_configuration.h"
#include "opentelemetry/sdk/configuration/experimental_tracer_matcher_and_config_configuration.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/tracer_provider.json
// YAML-NODE: ExperimentalTracerConfigurator
class ExperimentalTracerConfiguratorConfiguration
{
public:
ExperimentalTracerConfigConfiguration default_config;
std::vector<ExperimentalTracerMatcherAndConfigConfiguration> tracers;
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <string>

#include "opentelemetry/sdk/configuration/experimental_tracer_config_configuration.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace configuration
{

// YAML-SCHEMA: schema/tracer_provider.json
// YAML-NODE: ExperimentalTracerMatcherAndConfig
class ExperimentalTracerMatcherAndConfigConfiguration
{
public:
std::string name;
ExperimentalTracerConfigConfiguration config;
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <memory>
#include <vector>

#include "opentelemetry/sdk/configuration/experimental_logger_configurator_configuration.h"
#include "opentelemetry/sdk/configuration/log_record_limits_configuration.h"
#include "opentelemetry/sdk/configuration/log_record_processor_configuration.h"
#include "opentelemetry/version.h"
Expand All @@ -23,7 +24,7 @@ class LoggerProviderConfiguration
public:
std::vector<std::unique_ptr<LogRecordProcessorConfiguration>> processors;
std::unique_ptr<LogRecordLimitsConfiguration> limits;
// FIXME: logger_configurator
std::unique_ptr<ExperimentalLoggerConfiguratorConfiguration> logger_configurator;
};

} // namespace configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <vector>

#include "opentelemetry/sdk/configuration/exemplar_filter.h"
#include "opentelemetry/sdk/configuration/experimental_meter_configurator_configuration.h"
#include "opentelemetry/sdk/configuration/metric_reader_configuration.h"
#include "opentelemetry/sdk/configuration/view_configuration.h"
#include "opentelemetry/version.h"
Expand All @@ -25,7 +26,7 @@ class MeterProviderConfiguration
std::vector<std::unique_ptr<MetricReaderConfiguration>> readers;
std::vector<std::unique_ptr<ViewConfiguration>> views;
ExemplarFilter exemplar_filter = ExemplarFilter::trace_based;
// FIXME: meter_configurator
std::unique_ptr<ExperimentalMeterConfiguratorConfiguration> meter_configurator;
};

} // namespace configuration
Expand Down
Loading
Loading