Program Listing for File periodic_exporting_metric_reader_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/metrics/export/periodic_exporting_metric_reader_options.h)

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

#pragma once

#include <chrono>

#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace metrics
{

constexpr std::chrono::milliseconds kExportIntervalMillis = std::chrono::milliseconds(60000);
constexpr std::chrono::milliseconds kExportTimeOutMillis  = std::chrono::milliseconds(30000);

struct OPENTELEMETRY_EXPORT PeriodicExportingMetricReaderOptions
{
  /* The time interval between two consecutive exports. */
  std::chrono::milliseconds export_interval_millis;

  /*  how long the export can run before it is cancelled. */
  std::chrono::milliseconds export_timeout_millis;

  PeriodicExportingMetricReaderOptions();
};

}  // namespace metrics
}  // namespace sdk
OPENTELEMETRY_END_NAMESPACE