1
#pragma once
2

            
3
#include "envoy/stats/scope.h"
4
#include "envoy/stats/stats_macros.h"
5

            
6
namespace Envoy {
7
namespace Extensions {
8
namespace Tracers {
9
namespace Datadog {
10

            
11
#define DATADOG_TRACER_STATS(COUNTER)                                                              \
12
56
  COUNTER(reports_skipped_no_cluster)                                                              \
13
56
  COUNTER(reports_sent)                                                                            \
14
56
  COUNTER(reports_dropped)                                                                         \
15
56
  COUNTER(reports_failed)
16

            
17
struct TracerStats {
18
  DATADOG_TRACER_STATS(GENERATE_COUNTER_STRUCT)
19
};
20

            
21
56
inline TracerStats makeTracerStats(Stats::Scope& scope) {
22
56
  return TracerStats{DATADOG_TRACER_STATS(POOL_COUNTER_PREFIX(scope, "tracing.datadog."))};
23
56
}
24

            
25
#undef DATADOG_TRACER_STATS
26

            
27
} // namespace Datadog
28
} // namespace Tracers
29
} // namespace Extensions
30
} // namespace Envoy