Program Listing for File parent_factory.h
↰ Return to documentation for file (/tmp/B.puc0r6hi/BUILD/opentelemetry-cpp-1.27.0-build/opentelemetry-cpp-1.27.0/sdk/include/opentelemetry/sdk/trace/samplers/parent_factory.h)
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <memory>
#include "opentelemetry/sdk/trace/sampler.h"
#include "opentelemetry/version.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class ParentBasedSamplerFactory
{
public:
static std::unique_ptr<Sampler> Create(const std::shared_ptr<Sampler> &root_sampler);
static std::unique_ptr<Sampler> Create(
const std::shared_ptr<Sampler> &root_sampler,
const std::shared_ptr<Sampler> &remote_parent_sampled_sampler,
const std::shared_ptr<Sampler> &remote_parent_nonsampled_sampler,
const std::shared_ptr<Sampler> &local_parent_sampled_sampler,
const std::shared_ptr<Sampler> &local_parent_nonsampled_sampler);
};
} // namespace trace
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE