Program Listing for File batch_log_record_processor_options.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/logs/batch_log_record_processor_options.h)

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <chrono>
#include <cstddef>

#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{

namespace logs
{

namespace batch_log_record_processor_options_env
{

OPENTELEMETRY_EXPORT size_t GetMaxQueueSizeFromEnv();

OPENTELEMETRY_EXPORT std::chrono::milliseconds GetScheduleDelayFromEnv();

OPENTELEMETRY_EXPORT std::chrono::milliseconds GetExportTimeoutFromEnv();

OPENTELEMETRY_EXPORT size_t GetMaxExportBatchSizeFromEnv();

}  // namespace batch_log_record_processor_options_env

struct OPENTELEMETRY_EXPORT BatchLogRecordProcessorOptions
{
  size_t max_queue_size = batch_log_record_processor_options_env::GetMaxQueueSizeFromEnv();

  /* The time interval between two consecutive exports. */
  std::chrono::milliseconds schedule_delay_millis =
      batch_log_record_processor_options_env::GetScheduleDelayFromEnv();

  std::chrono::milliseconds export_timeout_millis =
      batch_log_record_processor_options_env::GetExportTimeoutFromEnv();

  size_t max_export_batch_size =
      batch_log_record_processor_options_env::GetMaxExportBatchSizeFromEnv();
};

}  // namespace logs
}  // namespace sdk
OPENTELEMETRY_END_NAMESPACE