Class AbstractJdbcMetricRepository

java.lang.Object
io.kestra.jdbc.repository.AbstractJdbcRepository
io.kestra.jdbc.repository.AbstractJdbcMetricRepository
All Implemented Interfaces:
io.kestra.core.repositories.MetricRepositoryInterface, io.kestra.core.repositories.SaveRepositoryInterface<io.kestra.core.models.executions.MetricEntry>, JdbcIndexerInterface<io.kestra.core.models.executions.MetricEntry>

@Singleton public abstract class AbstractJdbcMetricRepository extends AbstractJdbcRepository implements io.kestra.core.repositories.MetricRepositoryInterface, JdbcIndexerInterface<io.kestra.core.models.executions.MetricEntry>
  • Field Details

    • jdbcRepository

      protected AbstractJdbcRepository<io.kestra.core.models.executions.MetricEntry> jdbcRepository
  • Constructor Details

    • AbstractJdbcMetricRepository

      public AbstractJdbcMetricRepository(AbstractJdbcRepository<io.kestra.core.models.executions.MetricEntry> jdbcRepository)
  • Method Details

    • findByExecutionId

      public io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.executions.MetricEntry> findByExecutionId(String tenantId, String executionId, io.micronaut.data.model.Pageable pageable)
      Specified by:
      findByExecutionId in interface io.kestra.core.repositories.MetricRepositoryInterface
    • findByExecutionIdAndTaskId

      public io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.executions.MetricEntry> findByExecutionIdAndTaskId(String tenantId, String executionId, String taskId, io.micronaut.data.model.Pageable pageable)
      Specified by:
      findByExecutionIdAndTaskId in interface io.kestra.core.repositories.MetricRepositoryInterface
    • findByExecutionIdAndTaskRunId

      public io.kestra.core.repositories.ArrayListTotal<io.kestra.core.models.executions.MetricEntry> findByExecutionIdAndTaskRunId(String tenantId, String executionId, String taskRunId, io.micronaut.data.model.Pageable pageable)
      Specified by:
      findByExecutionIdAndTaskRunId in interface io.kestra.core.repositories.MetricRepositoryInterface
    • flowMetrics

      public List<String> flowMetrics(String tenantId, String namespace, String flowId)
      Specified by:
      flowMetrics in interface io.kestra.core.repositories.MetricRepositoryInterface
    • taskMetrics

      public List<String> taskMetrics(String tenantId, String namespace, String flowId, String taskId)
      Specified by:
      taskMetrics in interface io.kestra.core.repositories.MetricRepositoryInterface
    • tasksWithMetrics

      public List<String> tasksWithMetrics(String tenantId, String namespace, String flowId)
      Specified by:
      tasksWithMetrics in interface io.kestra.core.repositories.MetricRepositoryInterface
    • aggregateByFlowId

      public io.kestra.core.models.executions.metrics.MetricAggregations aggregateByFlowId(String tenantId, String namespace, String flowId, @Nullable String taskId, String metric, ZonedDateTime startDate, ZonedDateTime endDate, String aggregation)
      Specified by:
      aggregateByFlowId in interface io.kestra.core.repositories.MetricRepositoryInterface
    • save

      public io.kestra.core.models.executions.MetricEntry save(io.kestra.core.models.executions.MetricEntry metric)
      Specified by:
      save in interface io.kestra.core.repositories.SaveRepositoryInterface<io.kestra.core.models.executions.MetricEntry>
    • purge

      public Integer purge(io.kestra.core.models.executions.Execution execution)
      Specified by:
      purge in interface io.kestra.core.repositories.MetricRepositoryInterface
    • save

      public io.kestra.core.models.executions.MetricEntry save(org.jooq.DSLContext dslContext, io.kestra.core.models.executions.MetricEntry metric)
      Specified by:
      save in interface JdbcIndexerInterface<io.kestra.core.models.executions.MetricEntry>
    • sortMapping

      public Function<String,String> sortMapping() throws IllegalArgumentException
      Specified by:
      sortMapping in interface io.kestra.core.repositories.MetricRepositoryInterface
      Throws:
      IllegalArgumentException