1
#include "source/extensions/stat_sinks/metrics_service/grpc_metrics_proto_descriptors.h"
2

            
3
#include "envoy/config/metrics/v3/metrics_service.pb.h"
4

            
5
#include "source/common/common/assert.h"
6
#include "source/common/common/fmt.h"
7
#include "source/common/config/api_version.h"
8
#include "source/common/protobuf/protobuf.h"
9

            
10
namespace Envoy {
11
namespace Extensions {
12
namespace StatSinks {
13
namespace MetricsService {
14

            
15
2
void validateProtoDescriptors() {
16
2
  const auto method = "envoy.service.metrics.v3.MetricsService.StreamMetrics";
17

            
18
2
  RELEASE_ASSERT(Protobuf::DescriptorPool::generated_pool()->FindMethodByName(method) != nullptr,
19
2
                 "");
20

            
21
2
  const auto config = "envoy.config.metrics.v3.MetricsServiceConfig";
22

            
23
  // Keeping this as an ASSERT because ApiTypeOracle::getEarlierVersionDescriptor also has an
24
  // ASSERT.
25
2
  ASSERT(Protobuf::DescriptorPool::generated_pool()->FindMessageTypeByName(config) != nullptr, "");
26
2
};
27
} // namespace MetricsService
28
} // namespace StatSinks
29
} // namespace Extensions
30
} // namespace Envoy