-
Notifications
You must be signed in to change notification settings - Fork 529
Add file configuration types for Tracer, Meter, and Logger #3920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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}; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The yaml attribute has been renamed to 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the meter config here says
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
There was a problem hiding this comment.
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
Experimentalall the time.Please change:
to remove the
Experimentalpart.