Docker

Raygun APM Docker images can be found on dockerhub.

To pull the latest Raygun APM Agent image and run it, use the following commands:

docker pull raygunowner/raygun-apm:latest
docker run --name raygun-agent -v raygun-agent:/usr/share/Raygun -e "RAYGUN_AGENT_TOKEN=[YOUR-API-KEY]" -p 2790:2790 -p 2799:2799/udp -it raygunowner/raygun-apm:latest

Some useful commands that can be run against the Docker container:

# Get the status of the Raygun Agent
docker exec raygun-agent ./rgc -status

# Get the stats from the Raygun Agent
docker exec raygun-agent ./rgc -debugstats

# Tail the log from the container
docker container logs --tail 100 raygun-agent

The following is an example docker-compose.yml file with the Raygun APM Agent included.

version: '3'

services:
  raygun:
    image: raygunowner/raygun-apm:latest
    ports:
      - "2790:2790"
      - "2799:2799/udp"
    volumes:
      - raygun-agent:/usr/share/Raygun
    environment:
      RAYGUN_AGENT_TOKEN: "[YOUR-API-KEY]"
    tty: true

volumes:
  raygun-agent:

By default the Ruby and Node profilers will send traffic to the agent via localhost. If the agent is not running on the same host as your application, you can configure these profilers to send data to a specified host. Set these variables where your app can access them:

  • Ruby profiler:
PROTON_UDP_HOST=<name or ip of the agent container>
  • Node profiler:
RAYGUN_AGENT_HOST=<name or ip of the agent container>
  • .NET profiler:

    When using the .NET profiler, the profiler must be able to reach the agent on localhost.