CI Visibility is not available in the selected site () at this time.

Overview

TeamCity is a continuous integration and delivery server that optimizes and automates software development processes.

Set up tracing in TeamCity to collect data about your pipeline executions, debug performance bottlenecks, address operational issues, and optimize your development workflows.

Compatibility

Pipeline VisibilityPlatformDefinition
Partial retriesRetry build triggersView partially retried pipeline executions.
Queue timeQueue timeView the amount of time pipeline jobs sit in the queue before processing.
Pipeline failure reasonsPipeline failure reasonsIdentify pipeline failure reasons from error messages.

The following TeamCity versions are supported:

  • TeamCity >= 2021.2 or later

Configure the Datadog integration

The integration between TeamCity and Datadog CI Visibility is provided through a TeamCity plugin. To activate the integration:

  1. Download the Datadog CI Integration plugin on the TeamCity server by going to Administration -> Plugins -> Browse Plugin Repository.

  2. If you don’t already have one, add a TeamCity composite build as the last build of the build chain. This build must have a dependency on the current last build of the chain and no other builds depending on it. Build chains not having a composite build as their last build are ignored by the plugin. Below is an example of an expected build chain, in which Aggregating Results is the last composite build:

    TeamCity build chain with composite build at the end
    The final composite build must be properly configured in terms of version control settings, with the VCS Root attached and the VCS Trigger configured.

  3. The following configuration parameters need to be present for TeamCity projects:

    • datadog.ci.api.key: Your Datadog API Key.
    • datadog.ci.site: .
    • datadog.ci.enabled: true (false can be used to disable the plugin for a specific project).

    These configuration parameters should not have type Password, as that prevents the plugin from correctly reading their values. They can be added either to TeamCity subprojects or to the TeamCity Root Project. When added to the Root project, they are propagated to all its subprojects. For example, to enable the plugin for all projects, add datadog.ci.enabled with the value true to the Root Project. More information on defining configuration parameters is available in the TeamCity Project Hierarchy documentation.

  4. To enable the plugin, click on Enable uploaded plugins in the Administration -> Plugins page. Alternatively, restart the TeamCity server.

Visualize pipeline data in Datadog

View your data on the CI Pipeline List and Executions pages after the pipelines finish.

The CI Pipeline List page shows data for only the default branch of each repository.

Configure Git user information

The plugin retrieves the Git author name and email based on the TeamCity username style. Datadog recommends using either Author Name and Email or Author Email username styles, as they provide information about the user email. When one of the other username styles is used (UserId or Author Name), the plugin automatically generates an email for the user by appending @Teamcity to the username. For example, if the UserId username style is used and the Git author username is john.doe, the plugin generates john.doe@Teamcity as the Git author email. The username style is defined for VCS Roots, and can be modified in the VCS Root settings.

Note: The Git author email is used for billing purposes, therefore there might be cost implications when username styles not providing email (UserId or Author Name) are used. Reach out to the Datadog support team if you have any questions about your use case.

プラグインリポジトリ

Datadog CI Integration プラグインのソースコードは、Apache 2.0 ライセンスでオープンソース化されています。

トラブルシューティング

Datadog CI Integration プラグインによって生成されたすべてのログは teamcity-server.log ファイルに保存され、TeamCity Server から Administration -> Diagnostic -> Server Logs にアクセスしてアクセスすることが可能です。これらのログを確認することで、プラグインに関する問題についての追加情報を得ることができます。

参考資料

PREVIEWING: esther/docs-8632-slo-blog-links