ORE Studio 0.0.4
Loading...
Searching...
No Matches
telemetry_options.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2025 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_TELEMETRY_EXPORTING_TELEMETRY_OPTIONS_HPP
21#define ORES_TELEMETRY_EXPORTING_TELEMETRY_OPTIONS_HPP
22
23#include <chrono>
24#include <cstdint>
25#include <iosfwd>
26#include <string>
27#include <filesystem>
28
30
38struct telemetry_options final {
45 std::string service_name;
46
52 std::string service_version;
53
60 std::filesystem::path output_file;
61
68 std::filesystem::path output_directory;
69
79 bool streaming_enabled = false;
80
91 std::uint32_t batch_size = 50;
92
102 std::chrono::seconds flush_interval{5};
103};
104
105std::ostream& operator<<(std::ostream& s, const telemetry_options& v);
106
107}
108
109#endif
Log export functionality for telemetry.
Definition file_log_exporter.hpp:28
Options related to telemetry export.
Definition telemetry_options.hpp:38
std::string service_name
Name of the service producing telemetry.
Definition telemetry_options.hpp:45
bool streaming_enabled
Enable streaming of log records to the server.
Definition telemetry_options.hpp:79
std::chrono::seconds flush_interval
Maximum time to wait before flushing a partial batch.
Definition telemetry_options.hpp:102
std::uint32_t batch_size
Number of records to batch before sending to the server.
Definition telemetry_options.hpp:91
std::filesystem::path output_file
Path to the output file for telemetry export.
Definition telemetry_options.hpp:60
std::string service_version
Version of the service producing telemetry.
Definition telemetry_options.hpp:52
std::filesystem::path output_directory
Directory in which to place the telemetry output file.
Definition telemetry_options.hpp:68