diff --git a/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp b/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp index 46c182386..43feca858 100644 --- a/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp +++ b/sdk/core/azure-core/inc/azure/core/internal/http/user_agent.hpp @@ -11,6 +11,8 @@ #include namespace Azure { namespace Core { namespace Http { namespace _detail { + // NOTE: Treat Azure::Core::Http::_detail::UserAgentGenerator::GenerateUserAgent() as _internal - + // it is being/has been used by eventhubs. class UserAgentGenerator { public: static std::string GenerateUserAgent( @@ -18,5 +20,16 @@ namespace Azure { namespace Core { namespace Http { namespace _detail { std::string const& componentVersion, std::string const& applicationId, long cplusplusValue); + + [[deprecated("Use an overload with additional cplusplusValue parameter.")]] static std::string + GenerateUserAgent( + std::string const& componentName, + std::string const& componentVersion, + std::string const& applicationId) + { + // The value of -3L is to signify that an old version of signature has been used (older + // version of eventhubs); we can't rely on cpp version reported by it. + return GenerateUserAgent(componentName, componentVersion, applicationId, -3L); + } }; }}}} // namespace Azure::Core::Http::_detail