Skip to main content

APM and Tracing

UniLink supports various APM and monitoring tools. You can enable them by configuring the given environment variables.

Sentry

Provide your sentry dsn.

SENTRY_DSN=

Scout

Provide values for the following environment variables. Refer scout documentation for additional options.

## https://scoutapm.com/docs/ruby/configuration
# SCOUT_KEY=YOURKEY
# SCOUT_NAME=YOURAPPNAME (Production)
# SCOUT_MONITOR=true

NewRelic

Enable Newrelic by configuring the license key. Refer newrelic documentation for additional options.

# https://docs.newrelic.com/docs/agents/ruby-agent/configuration/ruby-agent-configuration/
# NEW_RELIC_LICENSE_KEY=

DataDog

Datadog requires an agent running on the host machine to which the tracing library can send data. UniLink ruby code contains the tracing library, but you need to configure the agent in your host machine/docker environment for the integration to work.

Enable Datadog in chatwoot by configuring the trace agent url.

## https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#environment-variables
# DD_TRACE_AGENT_URL=http://localhost:8126

Running Datadog agent in local via docker

# to run in your local machine binding to port 8126
# replace <dd API key> and dd_site as required

docker run -d --name dd-agent -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -p 8126:8126 -e DD_API_KEY=<dd api key> -e DD_SITE="datadoghq.com" gcr.io/datadoghq/agent:7

Refer Datadog documentation to install the agent in specific environments like Ubuntu, Docker, kubernetes etc.