diff --git a/sdk/src/metrics/instrument_metadata_validator.cc b/sdk/src/metrics/instrument_metadata_validator.cc index 2ffbcd9e54..ff963c3dd1 100644 --- a/sdk/src/metrics/instrument_metadata_validator.cc +++ b/sdk/src/metrics/instrument_metadata_validator.cc @@ -52,7 +52,7 @@ bool InstrumentMetaDataValidator::ValidateName(nostd::string_view name) const // subsequent chars should be either of alphabets, digits, underscore, // minus, dot, slash return !std::any_of(std::next(name.begin()), name.end(), [](char c) { - return !isalnum(c) && (c != '-') && (c != '_') && (c != '.') && (c != "/"); + return !isalnum(c) && (c != '-') && (c != '_') && (c != '.') && (c != '/'); }); #endif }