提交 b8a414ed 编写于 作者: D Dhi Aurrahman 提交者: wu-sheng

Envoy metrics receiver plugin protos (#2304)

* Add envoy metrics service protos

This patch imports protos from envoyproxy/data-plane-api and
prometheus/client_model to enable metrics service service feature in
SkyWalking OAP.
Signed-off-by: NDhi Aurrahman <dio@tetrate.io>

* Add Envoy related docs
Signed-off-by: NDhi Aurrahman <dio@tetrate.io>

* Update the LICENSE to include new protos license

From:
- envoyproxy/data-plane-api
- prometheus/client_model
Signed-off-by: NDhi Aurrahman <dio@tetrate.io>

* Add a complete config.yaml example
Signed-off-by: NDhi Aurrahman <dio@tetrate.io>

* Add note on Envoy dynamic config
Signed-off-by: NDhi Aurrahman <dio@tetrate.io>

* Add protoc-gen-validate license
Signed-off-by: NDhi Aurrahman <dio@tetrate.io>

* Add samples
Signed-off-by: NDhi Aurrahman <dio@tetrate.io>

* Make CI and license right.

* Update README.md

@dhi typo :P

* Update README.md

Another typo :P

* Delete metrics.json

metrics.json is included in identify.json and not be linked in document.
上级 3ed7d705
......@@ -217,6 +217,10 @@ The text of each license is the standard Apache 2.0 license.
proto files from istio/istio: https://github.com/istio/istio Apache 2.0
proto files from istio/api: https://github.com/istio/api Apache 2.0
proto files from envoyproxy/data-plane-api: https://github.com/envoyproxy/data-plane-api Apache 2.0
proto files from prometheus/client_model: https://github.com/prometheus/client_model Apache 2.0
proto files from lyft/protoc-gen-validate: https://github.com/lyft/protoc-gen-validate Apache 2.0
proto files from
========================================================================
......
......@@ -3,7 +3,7 @@ Apache SkyWalking
<img src="http://skywalking.apache.org/assets/logo.svg" alt="Sky Walking logo" height="90px" align="right" />
**SkyWalking**: an APM(application performance monitor) system, especially designed for
**SkyWalking**: an APM(application performance monitor) system, especially designed for
microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures.
[![GitHub stars](https://img.shields.io/github/stars/apache/incubator-skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/incubator-skywalking)
......@@ -17,7 +17,7 @@ microservices, cloud native and container-based (Docker, Kubernetes, Mesos) arch
# Abstract
**SkyWalking** is an open source APM system, including monitoring, tracing, diagnosing capabilities for distributed system
in Cloud Native architecture.
in Cloud Native architecture.
The core features are following.
- Service, service instance, endpoint metrics analysis
......@@ -34,15 +34,16 @@ The core features are following.
<img src="http://skywalking.apache.org/assets/frame.jpeg"/>
SkyWalking supports to collect telemetry (traces and metrics) data from multiple sources
and multiple formats,
including
and multiple formats,
including
1. Java, .NET Core, NodeJS and PHP auto-instrument agents in SkyWalking format
1. Istio telemetry format
1. Zipkin v1/v2 formats
1. Zipkin v1/v2 format
1. Envoy metrics format (the metric entries itself is prometheus client [metric family](https://github.com/prometheus/client_model/blob/fd36f4220a901265f90734c3183c5f0c91daa0b8/metrics.proto#L77))
# Document
- [6.x Documents](docs/README.md).
- [6.x Documents](docs/README.md).
# Downloads
......@@ -50,7 +51,7 @@ Please head to the [releases page](http://skywalking.apache.org/downloads/) to d
# Code of conduct
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
Please report unacceptable behavior to dev@skywalking.apache.org .
# Live Demo
......@@ -103,7 +104,7 @@ SkyWalking enriches the <a href="https://landscape.cncf.io/landscape=observabili
</p>
<p align="center">
<a href="https://openapm.io"><img src="https://openapm.io/static/media/openapm_logo.svg" width="100"/></a>
<a href="https://openapm.io"><img src="https://openapm.io/static/media/openapm_logo.svg" width="100"/></a>
<br/>Our project enriches the <a href="https://openapm.io">OpenAPM Landscape!</a>
</p>
......
......@@ -307,6 +307,9 @@ The text of each license is the standard Apache 2.0 license.
consul-client 1.2.6: https://github.com/rickfast/consul-client, Apache 2.0
okhttp 3.9.0: https://github.com/square/okhttp, Apache 2.0
prometheus client_java 0.6.0: https://github.com/prometheus/client_java, Apache 2.0
proto files from envoyproxy/data-plane-api: https://github.com/envoyproxy/data-plane-api Apache 2.0
proto files from prometheus/client_model: https://github.com/prometheus/client_model Apache 2.0
proto files from lyft/protoc-gen-validate: https://github.com/lyft/protoc-gen-validate Apache 2.0
========================================================================
MIT licenses
......@@ -336,7 +339,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
Google: protobuf-java 3.4.0: https://github.com/google/protobuf/blob/master/java/pom.xml , BSD-3-Clause
Google: protobuf-java-util 3.4.0: https://github.com/google/protobuf/blob/master/java/pom.xml , BSD-3-Clause
reflectasm 1.11.3: https://github.com/EsotericSoftware/reflectasm , BSD-3-Clause
gogo-protobuf, proto files: https://github.com/gogo/protobuf BSD-2-Clause
========================================================================
......
......@@ -8,7 +8,7 @@ Setup based on which kind of probes are you going to use. If you don't understan
## Download official releases
- Backend, UI and Java agent are Apache official release, you could find them at [Apache SkyWalking DOWNLOAD page](http://skywalking.apache.org/downloads/).
## Language agents in Service
## Language agents in Service
- [Java agent](service-agent/java-agent/README.md). Introduce how to install java agent to your service, without change any codes.
......@@ -21,7 +21,8 @@ You could go to their project repositories to find out the releases and how to u
## On Service Mesh
- Istio
- [SkyWalking on Istio](istio/README.md). Introduce how to use Istio Mixer bypass Adapter to work with SkyWalking.
- [Envoy Proxy](https://www.envoyproxy.io/)
- [Sending metrics to Skywalking from Envoy](envoy/README.md). How to send metrics from Envoy to SkyWalking using [Metrics service](https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/metrics/v2/metrics_service.proto.html).
## Setup backend
Follow [backend and UI setup document](backend/backend-ui-setup.md) to understand and config the backend for different
......
# Configuring Envoy to send metrics to SkyWalking
In order to let Envoy to send metrics to SkyWalking, we need to feed Envoy with a configuration which contains `stats_sinks` that includes `envoy.metrics_service`.
This `envoy.metrics_service` should be configured as a [`config.grpc_service`](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/grpc_service.proto#envoy-api-msg-core-grpcservice) entry.
The interesting parts of the config is shown in the config below:
```yaml
stats_sinks:
- name: envoy.metrics_service
config:
grpc_service:
# Note: we can use google_grpc implementation as well.
envoy_grpc:
cluster_name: skywalking_service
static_resources:
...
clusters:
- name: skywalking_service
connect_timeout: 5s
type: LOGICAL_DNS
http2_protocol_options: {}
dns_lookup_family: V4_ONLY
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: service_stats
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: skywalking
# This is the port where SkyWalking serving the Envoy Metrics Service gRPC stream.
port_value: 11800
```
A more complete static configuration, can be observed here [config.yaml].
Note that Envoy can also be configured dynamically through [xDS Protocol](https://github.com/envoyproxy/data-plane-api/blob/master/XDS_PROTOCOL.md).
# Metrics data
Some of the Envoy statitics are listed in this [list](https://www.envoyproxy.io/docs/envoy/latest/configuration/statistics). While a sample data that contains idetifier can be found [here](identify.json), while the metrics only can be observed [here](https://www.envoyproxy.io/docs/envoy/latest/configuration/statistics).
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 9901
stats_sinks:
- name: envoy.metrics_service
config:
grpc_service:
envoy_grpc:
cluster_name: service_skywalking
static_resources:
listeners:
- name: listener_0
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
prefix: "/"
route:
host_rewrite: www.google.com
cluster: service_google
http_filters:
- name: envoy.router
clusters:
- name: service_skywalking
connect_timeout: 5s
type: LOGICAL_DNS
http2_protocol_options: {}
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: service_skywalking
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: skywalking
port_value: 11800
- name: service_google
connect_timeout: 5s
type: LOGICAL_DNS
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: service_google
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: www.google.com
port_value: 443
tls_context:
sni: www.google.com
{
"identifier": {
"node": {
"buildVersion": "e8ecf08f92941c4a2a892efc9b7dd672cfbb3fe8/1.10.0-dev/Modified/DEBUG/BoringSSL"
}
},
"envoyMetrics": [
{
"name": "cluster.service_google.membership_change",
"metric": [
{
"counter": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_google.update_attempt",
"metric": [
{
"counter": {
"value": 60
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_google.update_success",
"metric": [
{
"counter": {
"value": 60
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_pending_total",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.internal.upstream_rq_completed",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.internal.upstream_rq_5xx",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_503",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_5xx",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.update_attempt",
"metric": [
{
"counter": {
"value": 61
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_tx_bytes_total",
"metric": [
{
"counter": {
"value": 2080
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_destroy_remote_with_active_rq",
"metric": [
{
"counter": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_total",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.membership_change",
"metric": [
{
"counter": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_rx_bytes_total",
"metric": [
{
"counter": {
"value": 48
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_destroy_with_active_rq",
"metric": [
{
"counter": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.internal.upstream_rq_503",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_completed",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.update_success",
"metric": [
{
"counter": {
"value": 61
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_http2_total",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_total",
"metric": [
{
"counter": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_pending_failure_eject",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_connect_fail",
"metric": [
{
"counter": {
"value": 58
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "http.async-client.rq_total",
"metric": [
{
"counter": {
"value": 59
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "listener_manager.listener_added",
"metric": [
{
"counter": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "listener_manager.listener_create_success",
"metric": [
{
"counter": {
"value": 4
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster_manager.cluster_added",
"metric": [
{
"counter": {
"value": 2
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "runtime.deprecated_feature_use",
"metric": [
{
"counter": {
"value": 18
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_google.membership_degraded",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_google.membership_healthy",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_google.membership_total",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.membership_total",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.membership_healthy",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.membership_degraded",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_active",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_rq_pending_active",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.circuit_breakers.default.rq_open",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_active",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.circuit_breakers.default.rq_pending_open",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_rx_bytes_buffered",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.parent_connections",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.total_connections",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.concurrency",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 4
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.memory_allocated",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 4238160
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.hot_restart_epoch",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.days_until_first_cert_expiring",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 2147483647
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "listener_manager.total_listeners_active",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster_manager.active_clusters",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 2
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "listener_manager.total_listeners_warming",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster_manager.warming_clusters",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.version",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 15265008
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.uptime",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 301
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.live",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 1
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "server.memory_heap_size",
"type": "GAUGE",
"metric": [
{
"gauge": {
"value": 5242880
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "runtime.num_keys",
"type": "GAUGE",
"metric": [
{
"gauge": {},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_length_ms",
"type": "SUMMARY",
"metric": [
{
"summary": {
"quantile": [
{},
{
"quantile": 0.25
},
{
"quantile": 0.5
},
{
"quantile": 0.75
},
{
"quantile": 0.9
},
{
"quantile": 0.95
},
{
"quantile": 0.99
},
{
"quantile": 0.995
},
{
"quantile": 0.999
},
{
"quantile": 1
}
]
},
"timestampMs": "1551412080125"
}
]
},
{
"name": "cluster.service_stats.upstream_cx_connect_ms",
"type": "SUMMARY",
"metric": [
{
"summary": {
"quantile": [
{
"value": "NaN"
},
{
"quantile": 0.25,
"value": "NaN"
},
{
"quantile": 0.5,
"value": "NaN"
},
{
"quantile": 0.75,
"value": "NaN"
},
{
"quantile": 0.9,
"value": "NaN"
},
{
"quantile": 0.95,
"value": "NaN"
},
{
"quantile": 0.99,
"value": "NaN"
},
{
"quantile": 0.995,
"value": "NaN"
},
{
"quantile": 0.999,
"value": "NaN"
},
{
"quantile": 1,
"value": "NaN"
}
]
},
"timestampMs": "1551412080125"
}
]
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>server-receiver-plugin</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>6.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>envoy-metrics-receiver-plugin</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>skywalking-mesh-receiver-plugin</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<configuration>
<!--
The version of protoc must match protobuf-java. If you don't depend on
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.8.0:exe:${os.detected.classifier}
</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
syntax = "proto3";
package envoy.api.v2.core;
option java_outer_classname = "BaseProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.api.v2.core";
option go_package = "core";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
import "envoy/type/percent.proto";
option (gogoproto.equal_all) = true;
// [#protodoc-title: Common types]
// Identifies location of where either Envoy runs or where upstream hosts run.
message Locality {
// Region this :ref:`zone <envoy_api_field_core.Locality.zone>` belongs to.
string region = 1;
// Defines the local service zone where Envoy is running. Though optional, it
// should be set if discovery service routing is used and the discovery
// service exposes :ref:`zone data <envoy_api_field_endpoint.LocalityLbEndpoints.locality>`,
// either in this message or via :option:`--service-zone`. The meaning of zone
// is context dependent, e.g. `Availability Zone (AZ)
// <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
// on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
// GCP, etc.
string zone = 2;
// When used for locality of upstream hosts, this field further splits zone
// into smaller chunks of sub-zones so they can be load balanced
// independently.
string sub_zone = 3;
}
// Identifies a specific Envoy instance. The node identifier is presented to the
// management server, which may use this identifier to distinguish per Envoy
// configuration for serving.
message Node {
// An opaque node identifier for the Envoy node. This also provides the local
// service node name. It should be set if any of the following features are
// used: :ref:`statsd <arch_overview_statistics>`, :ref:`CDS
// <config_cluster_manager_cds>`, and :ref:`HTTP tracing
// <arch_overview_tracing>`, either in this message or via
// :option:`--service-node`.
string id = 1;
// Defines the local service cluster name where Envoy is running. Though
// optional, it should be set if any of the following features are used:
// :ref:`statsd <arch_overview_statistics>`, :ref:`health check cluster
// verification <envoy_api_field_core.HealthCheck.HttpHealthCheck.service_name>`,
// :ref:`runtime override directory <envoy_api_msg_config.bootstrap.v2.Runtime>`,
// :ref:`user agent addition
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.add_user_agent>`,
// :ref:`HTTP global rate limiting <config_http_filters_rate_limit>`,
// :ref:`CDS <config_cluster_manager_cds>`, and :ref:`HTTP tracing
// <arch_overview_tracing>`, either in this message or via
// :option:`--service-cluster`.
string cluster = 2;
// Opaque metadata extending the node identifier. Envoy will pass this
// directly to the management server.
google.protobuf.Struct metadata = 3;
// Locality specifying where the Envoy instance is running.
Locality locality = 4;
// This is motivated by informing a management server during canary which
// version of Envoy is being tested in a heterogeneous fleet. This will be set
// by Envoy in management server RPCs.
string build_version = 5;
}
syntax = "proto3";
package envoy.service.metrics.v2;
option java_outer_classname = "MetricsServiceProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.service.metrics.v2";
option go_package = "v2";
option java_generic_services = true;
import "envoy/api/v2/core/base.proto";
// This line is different from the definition in https://github.com/envoyproxy/data-plane-api to let
// the dependency structure clearer.
import "prometheus/client_model/metrics.proto";
import "validate/validate.proto";
// Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric
// data model as a standard to represent metrics information.
service MetricsService {
// Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
// response to be sent as nothing would be done in the case of failure.
rpc StreamMetrics(stream StreamMetricsMessage) returns (StreamMetricsResponse) {
}
}
message StreamMetricsResponse {
}
message StreamMetricsMessage {
message Identifier {
// The node sending metrics over the stream.
envoy.api.v2.core.Node node = 1 [(validate.rules).message.required = true];
}
// Identifier data effectively is a structured metadata. As a performance optimization this will
// only be sent in the first message on the stream.
Identifier identifier = 1;
// A list of metric entries
repeated io.prometheus.client.MetricFamily envoy_metrics = 2;
}
syntax = "proto3";
package envoy.type;
option java_outer_classname = "PercentProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.type";
import "validate/validate.proto";
import "gogoproto/gogo.proto";
option (gogoproto.equal_all) = true;
// [#protodoc-title: Percent]
// Identifies a percentage, in the range [0.0, 100.0].
message Percent {
double value = 1 [(validate.rules).double = {gte: 0, lte: 100}];
}
// A fractional percentage is used in cases in which for performance reasons performing floating
// point to integer conversions during randomness calculations is undesirable. The message includes
// both a numerator and denominator that together determine the final fractional value.
//
// * **Example**: 1/100 = 1%.
// * **Example**: 3/10000 = 0.03%.
message FractionalPercent {
// Specifies the numerator. Defaults to 0.
uint32 numerator = 1;
// Fraction percentages support several fixed denominator values.
enum DenominatorType {
// 100.
//
// **Example**: 1/100 = 1%.
HUNDRED = 0;
// 10,000.
//
// **Example**: 1/10000 = 0.01%.
TEN_THOUSAND = 1;
// 1,000,000.
//
// **Example**: 1/1000000 = 0.0001%.
MILLION = 2;
}
// Specifies the denominator. If the denominator specified is less than the numerator, the final
// fractional percentage is capped at 1 (100%).
DenominatorType denominator = 2 [(validate.rules).enum.defined_only = true];
}
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2013, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto2";
package gogoproto;
import "google/protobuf/descriptor.proto";
option java_package = "com.google.protobuf";
option java_outer_classname = "GoGoProtos";
option go_package = "github.com/gogo/protobuf/gogoproto";
extend google.protobuf.EnumOptions {
optional bool goproto_enum_prefix = 62001;
optional bool goproto_enum_stringer = 62021;
optional bool enum_stringer = 62022;
optional string enum_customname = 62023;
optional bool enumdecl = 62024;
}
extend google.protobuf.EnumValueOptions {
optional string enumvalue_customname = 66001;
}
extend google.protobuf.FileOptions {
optional bool goproto_getters_all = 63001;
optional bool goproto_enum_prefix_all = 63002;
optional bool goproto_stringer_all = 63003;
optional bool verbose_equal_all = 63004;
optional bool face_all = 63005;
optional bool gostring_all = 63006;
optional bool populate_all = 63007;
optional bool stringer_all = 63008;
optional bool onlyone_all = 63009;
optional bool equal_all = 63013;
optional bool description_all = 63014;
optional bool testgen_all = 63015;
optional bool benchgen_all = 63016;
optional bool marshaler_all = 63017;
optional bool unmarshaler_all = 63018;
optional bool stable_marshaler_all = 63019;
optional bool sizer_all = 63020;
optional bool goproto_enum_stringer_all = 63021;
optional bool enum_stringer_all = 63022;
optional bool unsafe_marshaler_all = 63023;
optional bool unsafe_unmarshaler_all = 63024;
optional bool goproto_extensions_map_all = 63025;
optional bool goproto_unrecognized_all = 63026;
optional bool gogoproto_import = 63027;
optional bool protosizer_all = 63028;
optional bool compare_all = 63029;
optional bool typedecl_all = 63030;
optional bool enumdecl_all = 63031;
optional bool goproto_registration = 63032;
optional bool messagename_all = 63033;
}
extend google.protobuf.MessageOptions {
optional bool goproto_getters = 64001;
optional bool goproto_stringer = 64003;
optional bool verbose_equal = 64004;
optional bool face = 64005;
optional bool gostring = 64006;
optional bool populate = 64007;
optional bool stringer = 67008;
optional bool onlyone = 64009;
optional bool equal = 64013;
optional bool description = 64014;
optional bool testgen = 64015;
optional bool benchgen = 64016;
optional bool marshaler = 64017;
optional bool unmarshaler = 64018;
optional bool stable_marshaler = 64019;
optional bool sizer = 64020;
optional bool unsafe_marshaler = 64023;
optional bool unsafe_unmarshaler = 64024;
optional bool goproto_extensions_map = 64025;
optional bool goproto_unrecognized = 64026;
optional bool protosizer = 64028;
optional bool compare = 64029;
optional bool typedecl = 64030;
optional bool messagename = 64033;
}
extend google.protobuf.FieldOptions {
optional bool nullable = 65001;
optional bool embed = 65002;
optional string customtype = 65003;
optional string customname = 65004;
optional string jsontag = 65005;
optional string moretags = 65006;
optional string casttype = 65007;
optional string castkey = 65008;
optional string castvalue = 65009;
optional bool stdtime = 65010;
optional bool stdduration = 65011;
}
// Copyright 2013 Prometheus Team
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package io.prometheus.client;
option java_package = "io.prometheus.client";
option go_package = "github.com/prometheus/client_model/go;io_prometheus_client";
message LabelPair {
optional string name = 1;
optional string value = 2;
}
enum MetricType {
COUNTER = 0;
GAUGE = 1;
SUMMARY = 2;
UNTYPED = 3;
HISTOGRAM = 4;
}
message Gauge {
optional double value = 1;
}
message Counter {
optional double value = 1;
}
message Quantile {
optional double quantile = 1;
optional double value = 2;
}
message Summary {
optional uint64 sample_count = 1;
optional double sample_sum = 2;
repeated Quantile quantile = 3;
}
message Untyped {
optional double value = 1;
}
message Histogram {
optional uint64 sample_count = 1;
optional double sample_sum = 2;
repeated Bucket bucket = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.
}
message Bucket {
optional uint64 cumulative_count = 1; // Cumulative in increasing order.
optional double upper_bound = 2; // Inclusive.
}
message Metric {
repeated LabelPair label = 1;
optional Gauge gauge = 2;
optional Counter counter = 3;
optional Summary summary = 4;
optional Untyped untyped = 5;
optional Histogram histogram = 7;
optional int64 timestamp_ms = 6;
}
message MetricFamily {
optional string name = 1;
optional string help = 2;
optional MetricType type = 3;
repeated Metric metric = 4;
}
......@@ -34,6 +34,7 @@
<module>skywalking-istio-telemetry-receiver-plugin</module>
<module>skywalking-register-receiver-plugin</module>
<module>skywalking-jvm-receiver-plugin</module>
<module>envoy-metrics-receiver-plugin</module>
</modules>
<dependencies>
......
......@@ -319,6 +319,10 @@
<!-- Proto files of Istio and gogoproto projects -->
<exclude>**/src/main/proto/gogoproto/gogo.proto</exclude>
<exclude>**/src/main/proto/envoy/**</exclude>
<exclude>**/src/main/proto/google/protobuf/*.proto</exclude>
<exclude>**/src/main/proto/prometheus/client_model/metrics.proto</exclude>
<exclude>**/src/main/proto/validate/validate.proto</exclude>
<!-- Maven Wrapper generated files -->
<exclude>.mvn/wrapper/maven-wrapper.properties</exclude>
</excludes>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册