NVIDIA DeepStream SDK API Reference

9.2 Release
includes/opentelemetry/sdk/logs/processor.h
Go to the documentation of this file.
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #pragma once
5 
6 #include <chrono>
7 #include <memory>
8 
9 #include "opentelemetry/version.h"
10 
12 namespace sdk
13 {
14 namespace logs
15 {
16 class Recordable;
17 
23 {
24 public:
25  virtual ~LogRecordProcessor() = default;
26 
35  virtual std::unique_ptr<Recordable> MakeRecordable() noexcept = 0;
36 
41  virtual void OnEmit(std::unique_ptr<Recordable> &&record) noexcept = 0;
42 
48  virtual bool ForceFlush(
49  std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept = 0;
50 
58  virtual bool Shutdown(
59  std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept = 0;
60 };
61 } // namespace logs
62 } // namespace sdk
logs
Definition: includes/opentelemetry/logs/event_id.h:13
OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_BEGIN_NAMESPACE
Definition: includes/opentelemetry/version.h:21
max
int max(int a, int b)
Compute the component-wise maximum.
Definition: sources/libs/nvmultiobjecttracker/include/modules/cuDCFv2/helper_math.h:60
OPENTELEMETRY_END_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
Definition: includes/opentelemetry/version.h:24
sdk::logs::LogRecordProcessor::~LogRecordProcessor
virtual ~LogRecordProcessor()=default
sdk::logs::LogRecordProcessor::OnEmit
virtual void OnEmit(std::unique_ptr< Recordable > &&record) noexcept=0
OnEmit is called by the SDK once a log record has been successfully created.
sdk
Definition: includes/opentelemetry/sdk/common/atomic_shared_ptr.h:13
sdk::logs::LogRecordProcessor::Shutdown
virtual bool Shutdown(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
Shuts down the processor and does any cleanup required.
sdk::logs::LogRecordProcessor::ForceFlush
virtual bool ForceFlush(std::chrono::microseconds timeout=(std::chrono::microseconds::max)()) noexcept=0
Exports all log records that have not yet been exported to the configured Exporter.
sdk::logs::LogRecordProcessor
The Log Processor is responsible for passing log records to the configured exporter.
Definition: includes/opentelemetry/sdk/logs/processor.h:22
sdk::logs::LogRecordProcessor::MakeRecordable
virtual std::unique_ptr< Recordable > MakeRecordable() noexcept=0
Create a log recordable.