/** * Send a Series object to datadog * * @param Series $series * @throws Client\EmptySeriesException * * @return Client */ public function sendSeries(Series $series) { $metrics = $series->getMetrics(); if (empty($metrics)) { throw new EmptySeriesException('The series must contain metric data to send'); } $this->send(self::ENDPOINT_SERIES . $this->getApiKey(), $series->toArray()); return $this; }