Class InstrumentationLibrary
Defined in File instrumentation_library.h
Class Documentation
-
class opentelemetry::sdk::instrumentationlibrary::InstrumentationLibrary
Public Functions
-
InstrumentationLibrary(const InstrumentationLibrary&) = default
-
inline bool operator==(const InstrumentationLibrary &other) const
Compare 2 instrumentation libraries.
- Parameters
other – the instrumentation library 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 library has given name and version. This could be used to check version equality and avoid heap allocation.
- Parameters
name – name of the instrumentation library to compare.
version – version of the instrumentatoin library to compare.
schema_url – schema url of the telemetry emitted by the library.
- Returns
true if name and version in this instrumentation library 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<InstrumentationLibrary> Create(nostd::string_view name, nostd::string_view version = "", nostd::string_view schema_url = "")
Returns a newly created InstrumentationLibrary with the specified library name and version.
- Parameters
name – name of the instrumentation library.
version – version of the instrumentation library.
schema_url – schema url of the telemetry emitted by the library.
- Returns
the newly created InstrumentationLibrary.
-
InstrumentationLibrary(const InstrumentationLibrary&) = default