-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
503 additions
and
90 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
sdk/include/opentelemetry/sdk/configuration/console_metric_exporter_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "opentelemetry/sdk/configuration/headers_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration_visitor.h" | ||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class ConsoleMetricExporterConfiguration : public MetricExporterConfiguration | ||
{ | ||
public: | ||
ConsoleMetricExporterConfiguration() = default; | ||
~ConsoleMetricExporterConfiguration() override = default; | ||
|
||
void Accept(MetricExporterConfigurationVisitor *visitor) const override | ||
{ | ||
visitor->VisitConsole(this); | ||
} | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
34 changes: 34 additions & 0 deletions
34
sdk/include/opentelemetry/sdk/configuration/extension_metric_exporter_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "opentelemetry/sdk/configuration/document_node.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration_visitor.h" | ||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class ExtensionMetricExporterConfiguration : public MetricExporterConfiguration | ||
{ | ||
public: | ||
ExtensionMetricExporterConfiguration() = default; | ||
~ExtensionMetricExporterConfiguration() override = default; | ||
|
||
void Accept(MetricExporterConfigurationVisitor *visitor) const override | ||
{ | ||
visitor->VisitExtension(this); | ||
} | ||
|
||
std::string name; | ||
std::unique_ptr<DocumentNode> node; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
sdk/include/opentelemetry/sdk/configuration/metric_exporter_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
class MetricExporterConfigurationVisitor; | ||
|
||
class MetricExporterConfiguration | ||
{ | ||
public: | ||
MetricExporterConfiguration() = default; | ||
virtual ~MetricExporterConfiguration() = default; | ||
|
||
virtual void Accept(MetricExporterConfigurationVisitor *visitor) const = 0; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
33 changes: 33 additions & 0 deletions
33
sdk/include/opentelemetry/sdk/configuration/metric_exporter_configuration_visitor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class OtlpMetricExporterConfiguration; | ||
class ConsoleMetricExporterConfiguration; | ||
class PrometheusMetricExporterConfiguration; | ||
class ExtensionMetricExporterConfiguration; | ||
|
||
class MetricExporterConfigurationVisitor | ||
{ | ||
public: | ||
MetricExporterConfigurationVisitor() = default; | ||
virtual ~MetricExporterConfigurationVisitor() = default; | ||
|
||
virtual void VisitOtlp(const OtlpMetricExporterConfiguration *model) = 0; | ||
virtual void VisitConsole(const ConsoleMetricExporterConfiguration *model) = 0; | ||
virtual void VisitPrometheus(const PrometheusMetricExporterConfiguration *model) = 0; | ||
virtual void VisitExtension(const ExtensionMetricExporterConfiguration *model) = 0; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
25 changes: 25 additions & 0 deletions
25
sdk/include/opentelemetry/sdk/configuration/metric_reader_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class MetricReaderConfiguration | ||
{ | ||
public: | ||
MetricReaderConfiguration() = default; | ||
virtual ~MetricReaderConfiguration() = default; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
43 changes: 43 additions & 0 deletions
43
sdk/include/opentelemetry/sdk/configuration/otlp_metric_exporter_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "opentelemetry/sdk/configuration/headers_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration_visitor.h" | ||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class OtlpMetricExporterConfiguration : public MetricExporterConfiguration | ||
{ | ||
public: | ||
OtlpMetricExporterConfiguration() = default; | ||
~OtlpMetricExporterConfiguration() override = default; | ||
|
||
void Accept(MetricExporterConfigurationVisitor *visitor) const override | ||
{ | ||
visitor->VisitOtlp(this); | ||
} | ||
|
||
std::string protocol; | ||
std::string endpoint; | ||
std::string certificate; | ||
std::string client_key; | ||
std::string client_certificate; | ||
std::unique_ptr<HeadersConfiguration> headers; | ||
std::string compression; | ||
size_t timeout; | ||
std::string temporality_preference; | ||
int default_histogram_aggregation; // FIXME enum | ||
bool insecure; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
31 changes: 31 additions & 0 deletions
31
sdk/include/opentelemetry/sdk/configuration/periodic_metric_reader_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_reader_configuration.h" | ||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class PeriodicMetricReaderConfiguration : public MetricReaderConfiguration | ||
{ | ||
public: | ||
PeriodicMetricReaderConfiguration() = default; | ||
~PeriodicMetricReaderConfiguration() override = default; | ||
|
||
size_t interval; | ||
size_t timeout; | ||
std::unique_ptr<MetricExporterConfiguration> exporter; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
37 changes: 37 additions & 0 deletions
37
sdk/include/opentelemetry/sdk/configuration/prometheus_metric_exporter_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "opentelemetry/sdk/configuration/headers_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration_visitor.h" | ||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class PrometheusMetricExporterConfiguration : public MetricExporterConfiguration | ||
{ | ||
public: | ||
PrometheusMetricExporterConfiguration() = default; | ||
~PrometheusMetricExporterConfiguration() override = default; | ||
|
||
void Accept(MetricExporterConfigurationVisitor *visitor) const override | ||
{ | ||
visitor->VisitPrometheus(this); | ||
} | ||
|
||
std::string host; | ||
size_t port; | ||
bool without_units; | ||
bool without_type_suffix; | ||
bool without_scope_info; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
29 changes: 29 additions & 0 deletions
29
sdk/include/opentelemetry/sdk/configuration/pull_metric_reader_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <memory> | ||
|
||
#include "opentelemetry/sdk/configuration/metric_exporter_configuration.h" | ||
#include "opentelemetry/sdk/configuration/metric_reader_configuration.h" | ||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class PullMetricReaderConfiguration : public MetricReaderConfiguration | ||
{ | ||
public: | ||
PullMetricReaderConfiguration() = default; | ||
~PullMetricReaderConfiguration() override = default; | ||
|
||
std::unique_ptr<MetricExporterConfiguration> exporter; | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
sdk/include/opentelemetry/sdk/configuration/view_configuration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "opentelemetry/version.h" | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdk | ||
{ | ||
namespace configuration | ||
{ | ||
|
||
class ViewConfiguration | ||
{ | ||
public: | ||
}; | ||
|
||
} // namespace configuration | ||
} // namespace sdk | ||
OPENTELEMETRY_END_NAMESPACE |
Oops, something went wrong.