NVIDIA DeepStream SDK API Reference

9.2 Release
includes/opentelemetry/sdk/metrics/instrument_metadata_validator.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 "opentelemetry/nostd/string_view.h"
7 #include "opentelemetry/version.h"
8 
9 #if OPENTELEMETRY_HAVE_WORKING_REGEX
10 # include <regex>
11 #endif
12 
14 namespace sdk
15 {
16 namespace metrics
17 {
19 {
20 public:
22  bool ValidateName(nostd::string_view name) const;
23  bool ValidateUnit(nostd::string_view unit) const;
24  bool ValidateDescription(nostd::string_view description) const;
25 
26 private:
27 #if OPENTELEMETRY_HAVE_WORKING_REGEX
28  const std::regex name_reg_key_;
29  const std::regex unit_reg_key_;
30 #endif
31 };
32 
33 } // namespace metrics
34 } // namespace sdk
sdk::metrics::InstrumentMetaDataValidator
Definition: includes/opentelemetry/sdk/metrics/instrument_metadata_validator.h:18
sdk::metrics::InstrumentMetaDataValidator::InstrumentMetaDataValidator
InstrumentMetaDataValidator()
OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_BEGIN_NAMESPACE
Definition: includes/opentelemetry/version.h:21
sdk::metrics::InstrumentMetaDataValidator::ValidateDescription
bool ValidateDescription(nostd::string_view description) const
OPENTELEMETRY_END_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
Definition: includes/opentelemetry/version.h:24
sdk::metrics::InstrumentMetaDataValidator::ValidateName
bool ValidateName(nostd::string_view name) const
sdk::metrics::InstrumentMetaDataValidator::ValidateUnit
bool ValidateUnit(nostd::string_view unit) const
sdk
Definition: includes/opentelemetry/sdk/common/atomic_shared_ptr.h:13
metrics
Definition: includes/opentelemetry/metrics/async_instruments.h:10
nostd::string_view
Back port of std::string_view to work with pre-cpp-17 compilers.
Definition: includes/opentelemetry/nostd/string_view.h:37