add sending Envoy Metrics to OAP example within envoy 1.19 and bump up to Envoy V3 api. (#7366)
* bump up envoy metrics service sinks version. and update envoy.yaml config for demo.
This commit is contained in:
parent
8820287f38
commit
90de9f9515
|
|
@ -134,6 +134,7 @@ Release Notes.
|
|||
|
||||
* Add FAQ about `Elasticsearch exception type=version_conflict_engine_exception since 8.7.0`
|
||||
* Add Self Observability service discovery (k8s).
|
||||
* Add sending Envoy Metrics to OAP in envoy 1.19 example and bump up to Envoy V3 api.
|
||||
|
||||
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/90?closed=1)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,19 +9,33 @@ The example requires `docker` and `docker-compose` to be installed in your local
|
|||
|
||||
Note that in ths setup, we override the [`log4j2.xml`](log4j2.xml) config to set the `org.apache.skywalking.oap.server.receiver.envoy` logger level to `DEBUG`. This enables us to see the messages sent by Envoy to SkyWalking OAP server.
|
||||
|
||||
You can also find Envoy Metric Service V3 API example in [docker-compose-envoy-v3-api.yaml](./docker-compose-envoy-v3-api.yaml)
|
||||
```
|
||||
$ make up
|
||||
$ docker-compose logs -f skywalking
|
||||
$ # Please wait for a moment until SkyWalking is ready and Envoy starts sending the stats. You will see similar messages like the following:
|
||||
skywalking_1 | 2019-08-31 23:57:40,672 - org.apache.skywalking.oap.server.receiver.envoy.MetricServiceGRPCHandler -26870 [grpc-default-executor-0] DEBUG [] - Received msg identifier {
|
||||
skywalking_1 | 2021-07-23 13:25:30,683 - org.apache.skywalking.oap.server.receiver.envoy.MetricServiceGRPCHandler -19437 [grpcServerPool-1-thread-2] DEBUG [] - Received msg identifier {
|
||||
skywalking_1 | node {
|
||||
skywalking_1 | id: "ingress"
|
||||
skywalking_1 | cluster: "envoy-proxy"
|
||||
skywalking_1 | metadata {
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "skywalking"
|
||||
skywalking_1 | key: "LABELS"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "iscool"
|
||||
skywalking_1 | struct_value {
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "app"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "test-app"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "NAME"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "service-instance-name"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | fields {
|
||||
|
|
@ -30,27 +44,72 @@ skywalking_1 | value {
|
|||
skywalking_1 | string_value: "isawesome"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "skywalking"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "iscool"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | locality {
|
||||
skywalking_1 | region: "ap-southeast-1"
|
||||
skywalking_1 | zone: "zone1"
|
||||
skywalking_1 | sub_zone: "subzone1"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | build_version: "e349fb6139e4b7a59a9a359be0ea45dd61e589c5/1.11.1/Clean/RELEASE/BoringSSL"
|
||||
skywalking_1 | user_agent_name: "envoy"
|
||||
skywalking_1 | user_agent_build_version {
|
||||
skywalking_1 | version {
|
||||
skywalking_1 | major_number: 1
|
||||
skywalking_1 | minor_number: 19
|
||||
skywalking_1 | }
|
||||
skywalking_1 | metadata {
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "build.type"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "RELEASE"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "revision.sha"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "68fe53a889416fd8570506232052b06f5a531541"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "revision.status"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "Clean"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | fields {
|
||||
skywalking_1 | key: "ssl.version"
|
||||
skywalking_1 | value {
|
||||
skywalking_1 | string_value: "BoringSSL"
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | extensions {
|
||||
skywalking_1 | name: "composite-action"
|
||||
skywalking_1 | category: "envoy.matching.action"
|
||||
skywalking_1 | }
|
||||
......
|
||||
skywalking_1 | }
|
||||
skywalking_1 | }
|
||||
skywalking_1 | envoy_metrics {
|
||||
skywalking_1 | name: "cluster.service_skywalking.update_success"
|
||||
skywalking_1 | name: "cluster.service_google.update_no_rebuild"
|
||||
skywalking_1 | type: COUNTER
|
||||
skywalking_1 | metric {
|
||||
skywalking_1 | counter {
|
||||
skywalking_1 | value: 2.0
|
||||
skywalking_1 | value: 1.0
|
||||
skywalking_1 | }
|
||||
skywalking_1 | timestamp_ms: 1567295859556
|
||||
skywalking_1 | timestamp_ms: 1627046729718
|
||||
skywalking_1 | }
|
||||
......
|
||||
skywalking_1 | }
|
||||
...
|
||||
|
||||
$ # To tear down:
|
||||
$ make down
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
# 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.
|
||||
|
||||
version: "3"
|
||||
services:
|
||||
envoy19:
|
||||
image: envoyproxy/envoy-alpine:v1.19-latest
|
||||
command: /usr/local/bin/envoy -c /etc/envoy.yaml --service-cluster envoy-proxy
|
||||
ports:
|
||||
- 10001:10000
|
||||
depends_on:
|
||||
- skywalking
|
||||
volumes:
|
||||
- ./envoy-v1.19.yaml:/etc/envoy.yaml
|
||||
|
||||
skywalking:
|
||||
image: apache/skywalking-oap-server:latest
|
||||
volumes:
|
||||
- ./log4j2.xml:/skywalking/config/log4j2.xml
|
||||
expose:
|
||||
- "11800"
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
version: "3"
|
||||
services:
|
||||
envoy:
|
||||
envoy16:
|
||||
image: envoyproxy/envoy-alpine:v1.16.2
|
||||
command: /usr/local/bin/envoy -c /etc/envoy.yaml --service-cluster envoy-proxy
|
||||
ports:
|
||||
|
|
@ -24,7 +24,7 @@ services:
|
|||
depends_on:
|
||||
- skywalking
|
||||
volumes:
|
||||
- ./envoy.yaml:/etc/envoy.yaml
|
||||
- ./envoy-v1.16.yaml:/etc/envoy.yaml
|
||||
|
||||
skywalking:
|
||||
image: apache/skywalking-oap-server:latest
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ stats_sinks:
|
|||
cluster_name: service_skywalking
|
||||
|
||||
node:
|
||||
id: ingress
|
||||
cluster: card-api-cluster
|
||||
id: ingress-v1
|
||||
cluster: card-api-cluster-v1
|
||||
locality:
|
||||
region: ap-southeast-1
|
||||
zone: zone1
|
||||
|
|
@ -40,8 +40,8 @@ node:
|
|||
skywalking: iscool
|
||||
envoy: isawesome
|
||||
LABELS:
|
||||
app: test-app
|
||||
NAME: service-instance-name
|
||||
app: test-app-v1
|
||||
NAME: service-instance-name-v1
|
||||
|
||||
static_resources:
|
||||
listeners:
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
# 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.
|
||||
|
||||
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.stat_sinks.metrics_service
|
||||
typed_config:
|
||||
"@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig
|
||||
transport_api_version: V3
|
||||
grpc_service:
|
||||
envoy_grpc:
|
||||
cluster_name: service_skywalking
|
||||
|
||||
node:
|
||||
id: ingress-v2
|
||||
cluster: card-api-cluster-v2
|
||||
locality:
|
||||
region: ap-southeast-1
|
||||
zone: zone1
|
||||
sub_zone: subzone1
|
||||
metadata:
|
||||
skywalking: iscool
|
||||
envoy: isawesome
|
||||
LABELS:
|
||||
app: test-app-v2
|
||||
NAME: service-instance-name-v2
|
||||
|
||||
static_resources:
|
||||
listeners:
|
||||
- name: listener_0
|
||||
address:
|
||||
socket_address:
|
||||
protocol: TCP
|
||||
address: 0.0.0.0
|
||||
port_value: 10000
|
||||
filter_chains:
|
||||
- filters:
|
||||
- name: envoy.filters.network.http_connection_manager
|
||||
typed_config:
|
||||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
||||
codec_type: auto
|
||||
stat_prefix: ingress_http
|
||||
route_config:
|
||||
name: local_route
|
||||
virtual_hosts:
|
||||
- name: local_service
|
||||
domains: ["*"]
|
||||
routes:
|
||||
- match:
|
||||
prefix: "/"
|
||||
route:
|
||||
host_rewrite_literal: www.google.com
|
||||
cluster: service_google
|
||||
http_filters:
|
||||
- name: envoy.filters.http.router
|
||||
clusters:
|
||||
- name: service_skywalking
|
||||
connect_timeout: 5s
|
||||
type: LOGICAL_DNS
|
||||
typed_extension_protocol_options:
|
||||
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
|
||||
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
|
||||
explicit_http_config:
|
||||
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: STRICT_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
|
||||
transport_socket:
|
||||
name: envoy.transport_sockets.tls
|
||||
typed_config:
|
||||
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
|
||||
Loading…
Reference in New Issue