def METHOD_NAME(self, stats):
    """
    Send runtime stats to the backend.
    :param stats: stats
    :type json
    """
    start = get_current_epoch_time_ms()
    try:
        response = self._client.post(
            'telemetry',
            '/v1/metrics/usage',
            self._sdk_key,
            body=stats,
            extra_headers=self._metadata,
        )
        record_telemetry(response.status_code, get_current_epoch_time_ms() - start, HTTPExceptionsAndLatencies.TELEMETRY, self._telemetry_runtime_producer)
        if not 200 <= response.status_code < 300:
            raise APIException(response.body, response.status_code)
    except HttpClientException as exc:
        _LOGGER.debug(
            'Error posting runtime stats because an exception was raised by the HTTPClient'
        )
        _LOGGER.debug('Error: ', exc_info=True)
        raise APIException('Runtime stats not flushed properly.') from exc