Class InstrumentationScope
Defined in File instrumentation_scope.h
Class Documentation
-
class InstrumentationScope
Public Functions
-
InstrumentationScope(const InstrumentationScope&) = default
-
inline std::size_t HashCode() const noexcept
-
inline bool operator==(const InstrumentationScope &other) const
Compare 2 instrumentation libraries.
- Parameters
other – the instrumentation scope to compare to.
- Returns
true if the 2 instrumentation libraries are equal, false otherwise.
-
inline bool equal(const nostd::string_view name, const nostd::string_view version, const nostd::string_view schema_url = "") const
Check whether the instrumentation scope has given name and version. This could be used to check version equality and avoid heap allocation.
- Parameters
name – name of the instrumentation scope to compare.
version – version of the instrumentation scope to compare.
schema_url – schema url of the telemetry emitted by the scope.
- Returns
true if name and version in this instrumentation scope are equal with the given name and version.
-
inline const std::string &GetName() const
-
inline const std::string &GetVersion() const
-
inline const std::string &GetSchemaURL() const
Public Static Functions
-
static inline nostd::unique_ptr<InstrumentationScope> Create(nostd::string_view name, nostd::string_view version = "", nostd::string_view schema_url = "")
Returns a newly created InstrumentationScope with the specified library name and version.
- Parameters
name – name of the instrumentation scope.
version – version of the instrumentation scope.
schema_url – schema url of the telemetry emitted by the library.
- Returns
the newly created InstrumentationScope.
-
InstrumentationScope(const InstrumentationScope&) = default