Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kenrowland committed Sep 30, 2024
1 parent 3b20b29 commit 4e7b1f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion system/metrics/sinks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# HPCC SYSTEMS software Copyright (C) 20214HPCC Systems®.
# HPCC SYSTEMS software Copyright (C) 2024 HPCC Systems®.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
5 changes: 3 additions & 2 deletions system/metrics/sinks/elastic/elasticSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <cstdio>
#include "platform.h"

#include "nlohmann/json.hpp"

using namespace hpccMetrics;

extern "C" MetricSink* getSinkInstance(const char *name, const IPropertyTree *pSettingsTree)
Expand All @@ -25,8 +27,7 @@ extern "C" MetricSink* getSinkInstance(const char *name, const IPropertyTree *pS


ElasticMetricSink::ElasticMetricSink(const char *name, const IPropertyTree *pSettingsTree) :
PeriodicMetricSink(name, "file", pSettingsTree),
ignoreZeroMetrics(false)
PeriodicMetricSink(name, "elastic", pSettingsTree)
{
ignoreZeroMetrics = pSettingsTree->getPropBool("@ignoreZeroMetrics", true);
}
Expand Down
11 changes: 4 additions & 7 deletions system/metrics/sinks/elastic/elasticSink.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
#pragma GCC diagnostic pop
#endif

#include "nlohmann/json.hpp"


#ifdef ELASTICINK_EXPORTS
#define ELASTICSINK_API DECL_EXPORT
#else
Expand All @@ -49,11 +46,11 @@ class ELASTICSINK_API ElasticMetricSink : public hpccMetrics::PeriodicMetricSink
~ElasticMetricSink() override = default;

protected:
void prepareToStartCollecting() override;
void collectingHasStopped() override;
void doCollection() override;
virtual void prepareToStartCollecting() override;
virtual void collectingHasStopped() override;
virtual void doCollection() override;

protected:
StringBuffer indexName;
bool ignoreZeroMetrics;
bool ignoreZeroMetrics = false;
};

0 comments on commit 4e7b1f5

Please sign in to comment.