Allow AWS IoT metrics username to be overridden
*/
#define MQTT_PACKET_DISCONNECT_SIZE ( 2 ) /**< @brief A DISCONNECT packet is always 2 bytes in size. */
-/*
- * Username for metrics with AWS IoT.
- */
+/* Username for metrics with AWS IoT. */
#if AWS_IOT_MQTT_ENABLE_METRICS == 1 || DOXYGEN == 1
+ #ifndef AWS_IOT_METRICS_USERNAME
/**
- * @brief Check if an SDK name is defined. If not, specify "C SDK".
+ * @brief Specify C SDK and version.
*/
- #ifdef IOT_SDK_NAME
- #define METRICS_SDK_NAME IOT_SDK_NAME
- #else
- #define METRICS_SDK_NAME "C"
- #endif
-
-/**
- * @brief In the metrics string, include the platform name if defined.
- */
- #ifdef IOT_PLATFORM_NAME
- #define AWS_IOT_METRICS_USERNAME "?SDK=" METRICS_SDK_NAME "&Version=4.0.0&Platform=" IOT_PLATFORM_NAME
- #else
- #define AWS_IOT_METRICS_USERNAME "?SDK=" METRICS_SDK_NAME "&Version=4.0.0"
- #endif
+ #define AWS_IOT_METRICS_USERNAME "?SDK=C&Version=4.0.0"
/**
- * @brief Length of #AWS_IOT_METRICS_USERNAME.
+ * @brief The length of #AWS_IOT_METRICS_USERNAME.
*/
#define AWS_IOT_METRICS_USERNAME_LENGTH ( ( uint16_t ) sizeof( AWS_IOT_METRICS_USERNAME ) - 1 )
+ #endif /* ifndef AWS_IOT_METRICS_USERNAME */
#endif /* if AWS_IOT_MQTT_ENABLE_METRICS == 1 || DOXYGEN == 1 */
/*-----------------------------------------------------------*/
