Ejemplo n.º 1
0
 /**
  * @expectedException \Bayer\DataDogClient\Event\InvalidSourceTypeException
  */
 public function testInvalidSourceTypeThrowsException()
 {
     $event = new Event('Text', 'Title');
     $event->setSourceTypeName('foo');
 }
Ejemplo n.º 2
0
 /**
  * Send an Event object to datadog
  *
  * @param Event $event
  *
  * @return Client
  */
 public function sendEvent(Event $event)
 {
     $this->send(self::ENDPOINT_EVENT . $this->getApiKey(), $event->toArray());
     return $this;
 }
Ejemplo n.º 3
0
 public function testSendEvent()
 {
     $event = new Event('TestEvent', 'This is a testevent');
     $event->addTag('foo', 'bar')->setAlertType(Event::TYPE_SUCCESS)->setSourceTypeName(Event::SOURCE_MYAPPS)->setAggregationKey('unittest')->setPriority(Event::PRIORITY_LOW);
     $this->client->sendEvent($event);
 }