Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Increment the:
deprecated C headers (`stdint.h`, `stddef.h`, `stdlib.h`, `string.h`,
`stdio.h`, `ctype.h`, `limits.h`, `assert.h`) with their C++ equivalents
([#4349](https://github.com/open-telemetry/opentelemetry-cpp/pull/4349))

* [CONFIGURATION] Add SDK component builder interfaces to the registry
[#4358](https://github.com/open-telemetry/opentelemetry-cpp/issues/4358)

* [CODE HEALTH] Move remaining `misc-use-internal-linkage` classes/enums into
anonymous namespaces: `OtlpFileSystemBackend`/`OtlpFileOstreamBackend` in
the OTLP file exporter, `ResponseHandler`/`AsyncResponseHandler`/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class Sampler;
} // namespace trace

namespace configuration
{

class AlwaysOffSamplerBuilder
{
public:
AlwaysOffSamplerBuilder() = default;
AlwaysOffSamplerBuilder(AlwaysOffSamplerBuilder &&) = default;
AlwaysOffSamplerBuilder(const AlwaysOffSamplerBuilder &) = default;
AlwaysOffSamplerBuilder &operator=(AlwaysOffSamplerBuilder &&) = default;
AlwaysOffSamplerBuilder &operator=(const AlwaysOffSamplerBuilder &other) = default;
virtual ~AlwaysOffSamplerBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::Sampler> Build(
const opentelemetry::sdk::configuration::AlwaysOffSamplerConfiguration *model) const = 0;
};

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

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class Sampler;
} // namespace trace

namespace configuration
{

class AlwaysOnSamplerBuilder
{
public:
AlwaysOnSamplerBuilder() = default;
AlwaysOnSamplerBuilder(AlwaysOnSamplerBuilder &&) = default;
AlwaysOnSamplerBuilder(const AlwaysOnSamplerBuilder &) = default;
AlwaysOnSamplerBuilder &operator=(AlwaysOnSamplerBuilder &&) = default;
AlwaysOnSamplerBuilder &operator=(const AlwaysOnSamplerBuilder &other) = default;
virtual ~AlwaysOnSamplerBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::Sampler> Build(
const opentelemetry::sdk::configuration::AlwaysOnSamplerConfiguration *model) const = 0;
};

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

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace logs
{
class LogRecordExporter;
class LogRecordProcessor;
} // namespace logs

namespace configuration
{

class BatchLogRecordProcessorBuilder
{
public:
BatchLogRecordProcessorBuilder() = default;
BatchLogRecordProcessorBuilder(BatchLogRecordProcessorBuilder &&) = default;
BatchLogRecordProcessorBuilder(const BatchLogRecordProcessorBuilder &) = default;
BatchLogRecordProcessorBuilder &operator=(BatchLogRecordProcessorBuilder &&) = default;
BatchLogRecordProcessorBuilder &operator=(const BatchLogRecordProcessorBuilder &other) = default;
virtual ~BatchLogRecordProcessorBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::logs::LogRecordProcessor> Build(
const opentelemetry::sdk::configuration::BatchLogRecordProcessorConfiguration *model,
std::unique_ptr<opentelemetry::sdk::logs::LogRecordExporter> &&exporter) const = 0;
};

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

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class SpanExporter;
class SpanProcessor;
} // namespace trace

namespace configuration
{

class BatchSpanProcessorBuilder
{
public:
BatchSpanProcessorBuilder() = default;
BatchSpanProcessorBuilder(BatchSpanProcessorBuilder &&) = default;
BatchSpanProcessorBuilder(const BatchSpanProcessorBuilder &) = default;
BatchSpanProcessorBuilder &operator=(BatchSpanProcessorBuilder &&) = default;
BatchSpanProcessorBuilder &operator=(const BatchSpanProcessorBuilder &other) = default;
virtual ~BatchSpanProcessorBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::SpanProcessor> Build(
const opentelemetry::sdk::configuration::BatchSpanProcessorConfiguration *model,
std::unique_ptr<opentelemetry::sdk::trace::SpanExporter> &&exporter) const = 0;
};

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

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class ComposableSampler;
} // namespace trace

namespace configuration
{

class ComposableAlwaysOffSamplerBuilder
{
public:
ComposableAlwaysOffSamplerBuilder() = default;
ComposableAlwaysOffSamplerBuilder(ComposableAlwaysOffSamplerBuilder &&) = default;
ComposableAlwaysOffSamplerBuilder(const ComposableAlwaysOffSamplerBuilder &) = default;
ComposableAlwaysOffSamplerBuilder &operator=(ComposableAlwaysOffSamplerBuilder &&) = default;
ComposableAlwaysOffSamplerBuilder &operator=(const ComposableAlwaysOffSamplerBuilder &other) =
default;
virtual ~ComposableAlwaysOffSamplerBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::ComposableSampler> Build(
const opentelemetry::sdk::configuration::ComposableAlwaysOffSamplerConfiguration *model)
const = 0;
};

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

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class ComposableSampler;
} // namespace trace

namespace configuration
{

class ComposableAlwaysOnSamplerBuilder
{
public:
ComposableAlwaysOnSamplerBuilder() = default;
ComposableAlwaysOnSamplerBuilder(ComposableAlwaysOnSamplerBuilder &&) = default;
ComposableAlwaysOnSamplerBuilder(const ComposableAlwaysOnSamplerBuilder &) = default;
ComposableAlwaysOnSamplerBuilder &operator=(ComposableAlwaysOnSamplerBuilder &&) = default;
ComposableAlwaysOnSamplerBuilder &operator=(const ComposableAlwaysOnSamplerBuilder &other) =
default;
virtual ~ComposableAlwaysOnSamplerBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::ComposableSampler> Build(
const opentelemetry::sdk::configuration::ComposableAlwaysOnSamplerConfiguration *model)
const = 0;
};

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

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class ComposableSampler;
} // namespace trace

namespace configuration
{

class ComposableParentThresholdSamplerBuilder
{
public:
ComposableParentThresholdSamplerBuilder() = default;
ComposableParentThresholdSamplerBuilder(ComposableParentThresholdSamplerBuilder &&) = default;
ComposableParentThresholdSamplerBuilder(const ComposableParentThresholdSamplerBuilder &) =
default;
ComposableParentThresholdSamplerBuilder &operator=(ComposableParentThresholdSamplerBuilder &&) =
default;
ComposableParentThresholdSamplerBuilder &operator=(
const ComposableParentThresholdSamplerBuilder &other) = default;
virtual ~ComposableParentThresholdSamplerBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::ComposableSampler> Build(
const opentelemetry::sdk::configuration::ComposableParentThresholdSamplerConfiguration *model,
std::unique_ptr<opentelemetry::sdk::trace::ComposableSampler> &&root) const = 0;
};

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

#pragma once

#include <memory>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class ComposableSampler;
} // namespace trace

namespace configuration
{

class ComposableProbabilitySamplerBuilder
{
public:
ComposableProbabilitySamplerBuilder() = default;
ComposableProbabilitySamplerBuilder(ComposableProbabilitySamplerBuilder &&) = default;
ComposableProbabilitySamplerBuilder(const ComposableProbabilitySamplerBuilder &) = default;
ComposableProbabilitySamplerBuilder &operator=(ComposableProbabilitySamplerBuilder &&) = default;
ComposableProbabilitySamplerBuilder &operator=(const ComposableProbabilitySamplerBuilder &other) =
default;
virtual ~ComposableProbabilitySamplerBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::ComposableSampler> Build(
const opentelemetry::sdk::configuration::ComposableProbabilitySamplerConfiguration *model)
const = 0;
};

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

#pragma once

#include <memory>
#include <vector>

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

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class ComposableSampler;
} // namespace trace

namespace configuration
{

class ComposableRuleBasedSamplerBuilder
{
public:
ComposableRuleBasedSamplerBuilder() = default;
ComposableRuleBasedSamplerBuilder(ComposableRuleBasedSamplerBuilder &&) = default;
ComposableRuleBasedSamplerBuilder(const ComposableRuleBasedSamplerBuilder &) = default;
ComposableRuleBasedSamplerBuilder &operator=(ComposableRuleBasedSamplerBuilder &&) = default;
ComposableRuleBasedSamplerBuilder &operator=(const ComposableRuleBasedSamplerBuilder &other) =
default;
virtual ~ComposableRuleBasedSamplerBuilder() = default;

virtual std::unique_ptr<opentelemetry::sdk::trace::ComposableSampler> Build(
const opentelemetry::sdk::configuration::ComposableRuleBasedSamplerConfiguration *model,
std::vector<std::unique_ptr<opentelemetry::sdk::trace::ComposableSampler>> &&rule_samplers)
const = 0;
};

} // namespace configuration
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
Loading
Loading