- 重要な情報
- はじめに
- 用語集
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Custom commands provide a way to trace individual commands in your CI pipelines, allowing you to measure the time your command takes without taking into account any setup or teardown actions that the job might have (for example, downloading Docker images or waiting for an available node in a Kubernetes-based infrastructure). These spans appear as part of the pipeline’s trace:
Custom commands work with the following CI providers:
Install the datadog-ci
(>=v0.17.0) CLI globally using npm
:
npm install -g @datadog/datadog-ci
To trace a command, run:
datadog-ci trace [--name <name>] -- <command>
Specify a valid Datadog API key in the DATADOG_API_KEY
environment variable. For example:
DATADOG_API_KEY=<key> DATADOG_SITE= datadog-ci trace \
--name "Greet" \
-- \
echo "Hello World"
These options are available for the datadog-ci trace
command:
--name
<command>
Wait for DB to be reachable
--tags
key:value
to be attached to the custom command (the --tags
parameter can be specified multiple times). When specifying tags using DD_TAGS
, separate them using commas (for example, team:backend,priority:high
).DD_TAGS
team:backend
--tags
and with the DD_TAGS
environment variable are merged. If the same key appears in both --tags
and DD_TAGS
, the value in the environment variable DD_TAGS
takes precedence.--no-fail
false
The following environment variables are supported:
DATADOG_API_KEY
(Required)Additionally, configure the Datadog site to use the selected one ():
DATADOG_SITE
datadoghq.com
お役に立つドキュメント、リンクや記事: