Skip to content

Commit

Permalink
Update to OpenSearch internal breaking change
Browse files Browse the repository at this point in the history
The methods to get operation stats for Ingest operations were renamed.

See the following ticket for more details:
<opensearch-project/OpenSearch#8053>

Signed-off-by: Lukáš Vlček <[email protected]>
  • Loading branch information
lukas-vlcek committed Aug 1, 2023
1 parent a467002 commit f0d0ed5
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,26 +639,26 @@ private void registerIngestMetrics() {
@SuppressWarnings("checkstyle:LineLength")
private void updateIngestMetrics(Tuple<String, String> nodeInfo, IngestStats is) {
if (is != null) {
catalog.setNodeGauge(nodeInfo, "ingest_total_count", is.getTotalStats().getIngestCount());
catalog.setNodeGauge(nodeInfo, "ingest_total_time_seconds", is.getTotalStats().getIngestTimeInMillis() / 1000.0);
catalog.setNodeGauge(nodeInfo, "ingest_total_current", is.getTotalStats().getIngestCurrent());
catalog.setNodeGauge(nodeInfo, "ingest_total_failed_count", is.getTotalStats().getIngestFailedCount());
catalog.setNodeGauge(nodeInfo, "ingest_total_count", is.getTotalStats().getCount());
catalog.setNodeGauge(nodeInfo, "ingest_total_time_seconds", is.getTotalStats().getTotalTimeInMillis() / 1000.0);
catalog.setNodeGauge(nodeInfo, "ingest_total_current", is.getTotalStats().getCurrent());
catalog.setNodeGauge(nodeInfo, "ingest_total_failed_count", is.getTotalStats().getFailedCount());

for (IngestStats.PipelineStat st : is.getPipelineStats()) {
String pipeline = st.getPipelineId();
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_count", st.getStats().getIngestCount(), pipeline);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_time_seconds", st.getStats().getIngestTimeInMillis() / 1000.0, pipeline);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_current", st.getStats().getIngestCurrent(), pipeline);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_failed_count", st.getStats().getIngestFailedCount(), pipeline);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_count", st.getStats().getCount(), pipeline);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_time_seconds", st.getStats().getTotalTimeInMillis() / 1000.0, pipeline);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_current", st.getStats().getCurrent(), pipeline);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_failed_count", st.getStats().getFailedCount(), pipeline);

List<IngestStats.ProcessorStat> pss = is.getProcessorStats().get(pipeline);
if (pss != null) {
for (IngestStats.ProcessorStat ps : pss) {
String processor = ps.getName();
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_count", ps.getStats().getIngestCount(), pipeline, processor);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_time_seconds", ps.getStats().getIngestTimeInMillis() / 1000.0, pipeline, processor);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_current", ps.getStats().getIngestCurrent(), pipeline, processor);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_failed_count", ps.getStats().getIngestFailedCount(), pipeline, processor);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_count", ps.getStats().getCount(), pipeline, processor);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_time_seconds", ps.getStats().getTotalTimeInMillis() / 1000.0, pipeline, processor);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_current", ps.getStats().getCurrent(), pipeline, processor);
catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_failed_count", ps.getStats().getFailedCount(), pipeline, processor);
}
}
}
Expand Down

0 comments on commit f0d0ed5

Please sign in to comment.