mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Remove telemetry #includes from OpaqueVal.h
This commit is contained in:
parent
c659592773
commit
174bf09d77
4 changed files with 48 additions and 4 deletions
|
@ -15,9 +15,6 @@
|
|||
#include "zeek/RandTest.h"
|
||||
#include "zeek/Val.h"
|
||||
#include "zeek/digest.h"
|
||||
#include "zeek/telemetry/Counter.h"
|
||||
#include "zeek/telemetry/Gauge.h"
|
||||
#include "zeek/telemetry/Histogram.h"
|
||||
|
||||
namespace broker {
|
||||
class data;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "zeek/RunState.h"
|
||||
#include "zeek/storage/ReturnCode.h"
|
||||
|
||||
#include "const.bif.netvar_h"
|
||||
|
||||
std::atomic_flag expire_running;
|
||||
|
||||
namespace zeek::storage {
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
#include "Opaques.h"
|
||||
|
||||
#include "zeek/telemetry/Counter.h"
|
||||
#include "zeek/telemetry/Gauge.h"
|
||||
#include "zeek/telemetry/Histogram.h"
|
||||
|
||||
using namespace zeek;
|
||||
|
||||
TelemetryVal::TelemetryVal(std::shared_ptr<telemetry::Counter>) : OpaqueVal(counter_metric_type) {}
|
||||
|
@ -22,3 +26,33 @@ IMPLEMENT_OPAQUE_VALUE(GaugeMetricVal)
|
|||
IMPLEMENT_OPAQUE_VALUE(GaugeMetricFamilyVal)
|
||||
IMPLEMENT_OPAQUE_VALUE(HistogramMetricVal)
|
||||
IMPLEMENT_OPAQUE_VALUE(HistogramMetricFamilyVal)
|
||||
|
||||
template<>
|
||||
const char* CounterMetricVal::OpaqueName() const {
|
||||
return telemetry::Counter::OpaqueName;
|
||||
}
|
||||
|
||||
template<>
|
||||
const char* CounterMetricFamilyVal::OpaqueName() const {
|
||||
return telemetry::CounterFamily::OpaqueName;
|
||||
}
|
||||
|
||||
template<>
|
||||
const char* GaugeMetricVal::OpaqueName() const {
|
||||
return telemetry::Gauge::OpaqueName;
|
||||
}
|
||||
|
||||
template<>
|
||||
const char* GaugeMetricFamilyVal::OpaqueName() const {
|
||||
return telemetry::GaugeFamily::OpaqueName;
|
||||
}
|
||||
|
||||
template<>
|
||||
const char* HistogramMetricVal::OpaqueName() const {
|
||||
return telemetry::Histogram::OpaqueName;
|
||||
}
|
||||
|
||||
template<>
|
||||
const char* HistogramMetricFamilyVal::OpaqueName() const {
|
||||
return telemetry::HistogramFamily::OpaqueName;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,17 @@
|
|||
|
||||
namespace zeek {
|
||||
|
||||
namespace telemetry {
|
||||
|
||||
class Counter;
|
||||
class CounterFamily;
|
||||
class Gauge;
|
||||
class GaugeFamily;
|
||||
class Histogram;
|
||||
class HistogramFamily;
|
||||
|
||||
} // namespace telemetry
|
||||
|
||||
/**
|
||||
* Base class for metric handles. Handle types are not serializable.
|
||||
*/
|
||||
|
@ -43,7 +54,7 @@ public:
|
|||
protected:
|
||||
ValPtr DoClone(CloneState*) override { return make_intrusive<TelemetryValImpl>(hdl); }
|
||||
|
||||
const char* OpaqueName() const override { return Handle::OpaqueName; }
|
||||
const char* OpaqueName() const override;
|
||||
|
||||
private:
|
||||
HandleType hdl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue