datadog-raygun 0.1.1

Pipe Raygun metrics to DataDog

datadog_raygun

Usage

WEBHOOK_SECRET=secret \
  DATADOG_API_KEY=your-datadog-api-key \
  TAGS='{"Some Raygun Project": ["some-datadog-label", "some-other-datadog-label"]}' \
  QUEUE_DEADLINE=60 \
  LOG_LEVEL=DEBUG \
  datadog_raygun --port 3000

Docker

Build the image:

docker build -t datadog-raygun .

Run a container:

docker run -it \
  -e WEBHOOK_SECRET=secret \
  -e DATADOG_API_KEY=your-datadog-api-key \
  -e TAGS='{"Some Raygun Project": ["some-datadog-label", "some-other-datadog-label"]}' \
  -e QUEUE_DEADLINE=60 \
  -e LOG_LEVEL=DEBUG \
  -p 3000:80 \
  datadog-raygun

Your container will be reachable over port 3000.

Development

shards install
crystal src/datadog_raygun.cr

...or use sentry:

# Build sentry
crystal build lib/sentry/src/sentry_cli.cr

# Run sentry
./sentry_cli

The easiest way to test your local build in integration with Raygun would be via ngrok:

ngrok http 3000

Then you can configure your Raygun project to point to the ngrok host and trigger an error:

curl -XPOST https://api.raygun.com/entries -H "X-ApiKey: <RAYGUN API KEY>" -H "Content-Type: application/json" -d @examples/full.json -i

If you want to trigger a new error, change the groupingKey in examples/full.json.

If you don't want to expose your local server, you can simulate the Raygun callback to localhost:

curl -XPOST http://localhost:3000/webhook\?secret\=secret -H "Content-Type: application/json" -d @examples/error_reoccurred.json -i
Github statistic:
  • 0
  • 0
  • 1
  • 0
  • 3 days ago

License:

MIT License

Links: