To troubleshoot issues you encounter with Datadog monitoring on your Cloud Run services, run the datadog-ci cloud-run flare
command in the root of your project directory. This command collects important data about the Cloud Run service, such as environment variables and configuration information. These files will be submitted to Datadog support via a ticket matching the provided Zendesk case ID.
You must have valid GCP credentials configured with access to the Lambda and CloudWatch services where you are running any datadog-ci lambda
command. You can configure credentials by running gcloud auth application-default login
and following the prompts in your browser.
Expose these environment variables in the environment where you are running datadog-ci cloud-run flare
:
Environment Variable | Description | Example |
---|---|---|
DD_API_KEY |
Datadog API Key. Used to attach the flare files to your Zendesk ticket. For more information about getting a Datadog API key, see the API key documentation. | export DD_API_KEY=<API_KEY> |
DD_SITE |
Optional. Set which Datadog site to send the flare for lower latency. Possible values are datadoghq.com , datadoghq.eu , us3.datadoghq.com , us5.datadoghq.com , ap1.datadoghq.com , and ddog-gov.com . The default is datadoghq.com . |
export DD_SITE="datadoghq.com" |
Examples
# Collect and send files to Datadog support for a single service
datadog-ci cloud-run -s <service> -p <project> -r <region/location> -c <case-id> -e <email-on-case-id>
# Include recent logs
datadog-ci cloud-run -s <service> -p <project> -r <region/location> -c <case-id> -e <email-on-case-id> --with-logs
# Dry run: collect data, but don't send to Datadog support
datadog-ci cloud-run -s <service> -p <project> -r <region/location> -c <case-id> -e <email-on-case-id> --with-logs --dry-run
Arguments
Argument | Shorthand | Description | Default |
---|---|---|---|
--service |
-s |
The name of the Cloud Run service. | |
--project |
-p |
The name of the Google Cloud project where the Cloud Run service is hosted. | |
--region |
-r |
The region where the Cloud Run service is hosted. | |
--case-id |
-c |
The Datadog case ID to send the files to. | |
--email |
-e |
The email associated with the specified case ID. | |
--with-logs |
Collect recent logs for the specified service. | false |
|
--start and --end |
Only gather logs within the time range (--with-logs must be included.) Both arguments are numbers in milliseconds since Unix Epoch. |
||
--dry-run |
-d |
Preview data that will be sent to Datadog support. | false |
For product feedback and questions, join the #serverless
channel in the Datadog community on Slack.
Additional helpful documentation, links, and articles: