Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 6.5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.

Table of Contents

TeamCity provides several ways to customize statistics. You can add your own statistic values calculated by external tools in a build script, configure statistics charts displayed on Build Configuration and Project's Statistics tabs, display TeamCity statistics charts on plugin's pages, etc.

Quick Start

  • To add a custom build metric, extend BuildValueTypeBase to just define your build metric calculation method, appearance, and key. After that you can reference this metric by its key in statistics chart/report tags.
  • To insert statistics chart into a jsp page:

More Details

BuildType Statistics tab extension point

Customizing chart appearance

  • width, height — chart image size
  • hideFilters — suppress filter controls

Adding custom metrics

  1. Implement jetbrains.buildServer.serverSide.statistics.ValueType, extend BuildFinishAwareValueTypeBase or CompositeVTB for convenience
  2. Register it using jetbrains.buildServer.serverSide.statistics.ValueProviderRegistry.registerValueProvider

Custom build metrics details

  1. Implement in your ValueType to be notified of build finished event.
  2. Calculate your metric.
  3. Employ to publish your value.
  4. Employ to retrieve selected data.

See also: