Skip to content

Instantly share code, notes, and snippets.

@jimmyandrade
Created March 15, 2018 20:23
Show Gist options
  • Save jimmyandrade/b792fe34967111eabd8804b76f160814 to your computer and use it in GitHub Desktop.
Save jimmyandrade/b792fe34967111eabd8804b76f160814 to your computer and use it in GitHub Desktop.
Exemplo de integração com Intercom para lançar evento de erro
<?php
$metadata = ([
"url" => "https://tracksale.co/pavostacosjajaja",
"file" => "PavosTacosJajaController.php",
"line" => 2469,
"type" => "exception|note|error",
"message" => "BLABLABLA TODO O ERRO ESTÁ AQUI, VEJA SO QUE MERDA"
]);
$intercom->events->create([
"event_name" => "ts-logger-{type}" // sendo {type} um valor entre note|exception|error
"created_at" => 1500907513,
"email" => "peterzinho@tracksale.co",
"metadata" => $metadata
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment