SkillAgentSearch skills...

Talaiot

Simple and extensible plugin to track task times in your Gradle Project.

Install / Use

/learn @cdsap/Talaiot
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Talaiot

Talaiot is an extensible library targeting teams using the Gradle Build System. It records build/task duration helping to understand problems of the build and detecting bottlenecks. For every record, it will add additional information defined by default or custom metrics.

Talaiot is compatible with different systems like InfluxDb, Elasticsearch or RethinkDb. You need to use a Plugin to work with Talaiot. You can use the standard plugin, including all the functionality, or if you have a specific requirement with a individual plugin.

Current available plugins:

| Plugin | Description | |---------------|----------------------------------------------------------------------| | standard | Contains all the available publishers listed below | | base | Talaiot core functionality with Json, Output and Timeline publishers | | elasticsearch | Talaiot core functionality with Elasticsearch publisher | | influxdb | Talaiot core functionality with Influxdb publisher | | influxdb2 | Talaiot core functionality with Influxdb2 (Flux) publisher | | pushgateway | Talaiot core functionality with Pushgateway publisher | | rethinkdb | Talaiot core functionality with Rethinkdb publisher |

Once you have Talaiot integrated you can create dashboards using the build information stored:

What is Talaiot?

"... while some certainly had a defensive purpose, the use of others is not clearly understood. Some believe them to have served the purpose of lookout or signalling towers..."

https://en.wikipedia.org/wiki/Talaiot

Table of Contents

  1. Setup
  2. Snapshots
  3. Talaiot Extension
  4. Samples
  5. Example: Analyzing Data provided by Talaiot
  6. Other Existing Libraries
  7. Articles
  8. Contributing
  9. Contributors
  10. Thanks

Setup <a name="setup"></a>

Standard Plugin

Kotlin

Using the plugins DSL:

plugins {
  id("io.github.cdsap.talaiot") version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    gradlePluginPortal()
  }
  dependencies {
    classpath("io.github.cdsap:talaiot:<latest version>")
  }
}

apply(plugin = "io.github.cdsap.talaiot")

Groovy

Using the plugins DSL:

plugins {
  id "io.github.cdsap.talaiot" version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    gradlePluginPortal()
  }
  dependencies {
    classpath "io.github.cdsap:talaiot:<latest version>"
  }
}

apply plugin: "io.github.cdsap.talaiot"

Individual Plugins

Each plugin is deployed to the Gradle Plugin Portal using thee following convention:

| Plugin | Id | |----------------|-----------------------------------------| | base | io.github.cdsap.talaiot.plugin.base | | elasticsearch | io.github.cdsap.talaiot.plugin.elasticsearch | | influxdb | io.github.cdsap.talaiot.plugin.influxdb | | pushgateway | io.github.cdsap.talaiot.plugin.pushgateway | | rethinkdb | io.github.cdsap.talaiot.plugin.rehinkdb |

Kotlin Example Plugin

Using the plugins DSL:

plugins {
  id("io.github.cdsap.talaiot.plugin.base") version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    gradlePluginPortal()
  }
  dependencies {
    classpath("io.github.cdsap.talaiot.plugin:base:<latest version>")
  }
}

apply(plugin = "io.github.cdsap.talaiot.plugin.base")

Groovy

Using the plugins DSL:

plugins {
  id "io.github.cdsap.talaiot.plugin.base" version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    gradlePluginPortal()
  }
  dependencies {
    classpath "io.github.cdsap.talaiot.plugin:base:<latest version>"
  }
}

apply plugin: "io.github.cdsap.talaiot.plugin.base"

Snapshots <a name="snapshots"></a>

maven ( url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") )

Standard Plugin

classpath("io.github.cdsap:talaiot:<latest version>-SNAPSHOT")

Individual Plugin

classpath("io.github.cdsap.talaiot.plugin:base:<latest version>-SNAPSHOT")

Talaiot Extension <a name="talaiot-extension"></a>

| Property | Description | |----------------|---------------------------------------------------------------------------| | logger | Mode for logging (Silent,Info) | | ignoreWhen | Configuration to ignore the execution of Talaiot | | generateBuildId| Generation of unique identifier for each execution(disabled by default) | | publishers | Configuration to define where to submit the information of the build | | metrics | Additional information tracked during the execution of the task | | filter | Rules to filter the build or the tasks to be reported |

Metrics

We can include extra information on the build and task tracked data during the build. This information will be added to the default metrics defined.

talaiot {
    metrics {
        // You can add your own custom Metric objects:
        customMetrics(
            MyCustomMetric(),
            // Including some of the provided metrics, individually.
            HostnameMetric()
        )

        // Or define build or task metrics directly:
        customBuildMetrics(
            "kotlinVersion" to $kotlinVersion,
            "javaVersion" to $javaVersion
        )
        customTaskMetrics(
            "customProperty" to $value
        )
    }
}

Read more about it in the Metrics wiki page.

Experimental Provider Metrics

Since version 2.1.0, Talaiot includes an experimental mechanism to define metrics using a provider-based system compatible with Configuration Cache. This approach allows you to lazily evaluate metric values, ensuring that they are resolved only when needed during the build lifecycle. Two entry points are available for executing these providers:

  • Initialization phase – executed at the start of the execution phase.
  • Finalization phase – executed once the build has finished.

These APIs (initialProviderMetrics and finalProviderMetrics) are marked as experimental and may change in future versions. You can suppress the compiler warning by explicitly opting in with @OptIn(ExperimentalMetricsApi::class).

Example:

metrics {
    initialProviderMetrics(
        "init_memory_metric" to providers.of(GetMemory::class) {}
    )
    finalProviderMetrics(
        "end_memory_metric" to providers.of(GetMemory::class) {}
    )
}

Filters

For every measurement done, Talaiot can filter the tasks tracked to be published.

| Property | Description | |----------------------|----------------------------------------------------------------------------------------------| | tasks |Configuration used to filter which tasks we want to exclude and include in the execution | | module |Configuration used to filter which modules we want to exclude and include in the execution | | threshold |Configuration used to define time execution ranges to filter tasks to be reported |

For every measurement done, Talaiot can completely skip publishing process. These filters affect all publishers:

| Property | Description | |----------------------|----------------------------------------------------------------------------------------------| | build.success |Configuration used to skip publishing based on build success. | | build.requestedTasks |Configuration used to skip publishing based on what was the requested task. |

Example:

 filter {
     tasks {
         excludes = arrayOf("preDebugBuild", "processDebugResources")
     }
     modules {
         excludes = arrayOf(":app")
     }
     threshold {
         minExecutionTime = 10
     }
     build {
         success = true
         requestedTasks {
             includes = arrayOf(":app:assemble.*")
             excludes = arrayOf(":app:generate.*")
         }
     }
 }

IgnoreWhen

| Property | Description | |----------- |-----------------------| | envName |Name of the Property | | envValue |Value of the Property |

We will use IgnoreWhen when we want to ignore publishing the results of the build. One use case is to ignore it when we are building on CI:

talaiot {
    ignoreWhen {
        envName = "CI"
        envValue = "true"
    }
}

Publishers configuration <a name="talaiot-extension"></a>

The Publisher configuration will change depending on the type of plugin you are using. Standard Plugin provides all the different publisher configurations, for example:

talaiot {
    publishers {
        influxDbPublisher {
            dbName = "tracking"
            url = "http://localhost:8086"
            taskMetricName = "task"
            buildMetricName = "build"
        }

    }
    filter {
        threshold {
            minExecutionTime = 10
        }
    }
}

This configuration would be valid for the InfluxDb Plugin.

InfluxDbPublisher

Talaiot will send to the InfluxDb server defined in the configuration the values collected during the execution

| Property |

Related Skills

View on GitHub
GitHub Stars617
CategoryDevelopment
Updated1mo ago
Forks39

Languages

Kotlin

Security Score

100/100

Audited on Feb 26, 2026

No findings