How to direct logs from agent to datadog ?
# ask-ai
c
How to direct logs from agent to datadog ?
t
Thanks for reaching out, Subham. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd be happy to guide you through directing logs from your LiveKit agent to Datadog. Just follow these simple steps: 1. First, set the
DATADOG_TOKEN
secret with your Datadog client token by running this command:
Copy code
lk agent update-secrets --secrets "DATADOG_TOKEN=your-client-token"
1. If your Datadog account is in a region other than
us1
, you’ll want to set the
DATADOG_REGION
secret as well. For example:
Copy code
lk agent update-secrets --secrets "DATADOG_TOKEN=your-client-token" --secrets "DATADOG_REGION=us3"
After this setup, your LiveKit agent’s runtime logs will be sent over to Datadog. These logs will include helpful details like
host
,
source
,
service
, and
stream
. To make sure everything goes smoothly, please double-check the following: • Your
DATADOG_TOKEN
is valid and active. • If you’re outside the
us1
region, confirm that
DATADOG_REGION
is set correctly. Supported regions include:
us1
,
us3
,
us5
,
us1-fed
,
eu
, and
ap1
. • Your LiveKit agent is up and running, generating logs as expected. If you run into any issues, don’t worry! Just revisit the configuration and make sure the secrets have been applied properly. I’m here to help if you need any further assistance. Sources: Log collection | LiveKit Docs | Log collection | LiveKit Docs