|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
8 #include <unordered_map>
11 #include "opentelemetry/common/attribute_value.h"
12 #include "opentelemetry/common/key_value_iterable.h"
13 #include "opentelemetry/nostd/string_view.h"
14 #include "opentelemetry/sdk/common/custom_hash_equality.h"
15 #include "opentelemetry/sdk/metrics/state/filtered_ordered_attribute_map.h"
16 #include "opentelemetry/version.h"
24 using MetricAttributes = opentelemetry::sdk::metrics::FilteredOrderedAttributeMap;
26 typedef std::unordered_map<std::string,
28 opentelemetry::sdk::common::StringViewHash,
29 opentelemetry::sdk::common::StringViewEqual>
44 const opentelemetry::common::KeyValueIterable &attributes)
const noexcept = 0;
60 const opentelemetry::common::KeyValueIterable &attributes)
const noexcept
override
78 : allowed_attribute_keys_(
std::move(allowed_attribute_keys))
82 : allowed_attribute_keys_(allowed_attribute_keys)
86 const opentelemetry::common::KeyValueIterable &attributes)
const noexcept
override
89 attributes.ForEachKeyValue(
92 allowed_attribute_keys_.end())
94 result.SetAttribute(key, value);
107 allowed_attribute_keys_.end());
127 : exclude_list_(exclude_list)
131 const opentelemetry::common::KeyValueIterable &attributes)
const noexcept
override
138 result.SetAttribute(key, value);
151 exclude_list_.end());
virtual MetricAttributes process(const opentelemetry::common::KeyValueIterable &attributes) const noexcept=0
DefaultAttributesProcessor returns copy of input instrument attributes without any modification.
MetricAttributes process(const opentelemetry::common::KeyValueIterable &attributes) const noexcept override
FilteringExcludeAttributeProcessor filters by exclude attribute list and drops names if they are pres...
FilteringAttributesProcessor filters by allowed attribute names and drops any names that are not in t...
#define OPENTELEMETRY_BEGIN_NAMESPACE
FilteringExcludeAttributesProcessor(const FilterAttributeMap &exclude_list={})
bool isPresent(nostd::string_view key) const noexcept override
nostd::variant< bool, int32_t, int64_t, uint32_t, double, const char *, nostd::string_view, nostd::span< const bool >, nostd::span< const int32_t >, nostd::span< const int64_t >, nostd::span< const uint32_t >, nostd::span< const double >, nostd::span< const nostd::string_view >, uint64_t, nostd::span< const uint64_t >, nostd::span< const uint8_t > > AttributeValue
OpenTelemetry signals can be enriched by adding attributes.
opentelemetry::sdk::metrics::FilteredOrderedAttributeMap MetricAttributes
#define OPENTELEMETRY_END_NAMESPACE
constexpr absl::OTABSL_OPTION_NAMESPACE_NAME::remove_reference_t< T > && move(T &&t) noexcept
std::unordered_map< std::string, bool, opentelemetry::sdk::common::StringViewHash, opentelemetry::sdk::common::StringViewEqual > FilterAttributeMap
MetricAttributes process(const opentelemetry::common::KeyValueIterable &attributes) const noexcept override
virtual bool isPresent(nostd::string_view key) const noexcept=0
The AttributesProcessor is responsible for customizing which attribute(s) are to be reported as metri...
bool isPresent(nostd::string_view) const noexcept override
FilteringAttributesProcessor(const FilterAttributeMap &allowed_attribute_keys={})
auto find_heterogeneous(MapType &&map, opentelemetry::nostd::string_view key)
Cross-platform heterogeneous lookup wrapper.
bool isPresent(nostd::string_view key) const noexcept override
FilteringExcludeAttributesProcessor(FilterAttributeMap &&exclude_list={})
MetricAttributes process(const opentelemetry::common::KeyValueIterable &attributes) const noexcept override
FilteringAttributesProcessor(FilterAttributeMap &&allowed_attribute_keys={})
virtual ~AttributesProcessor()=default
Back port of std::string_view to work with pre-cpp-17 compilers.