Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracer: Add SkyWalking tracer #13060

Merged
merged 73 commits into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
74e0892
initial code from @dio
Sep 2, 2020
f384820
Tracer: support SkyWalking tracing report
Sep 11, 2020
b8ce5a3
add simple stats to skywalking tracer
Sep 12, 2020
f95f9dd
add more test for skywalking
Sep 14, 2020
f44d946
Merge branch 'master' of github.com:envoyproxy/envoy into skywalking
Sep 14, 2020
bf033d8
fix http tracer impl test
Sep 14, 2020
348387e
fix clang tidy check
Sep 16, 2020
d689a88
use authentication as token key
Sep 16, 2020
3dcb800
peer address looks like downstream adddress
Sep 17, 2020
5583faf
use request host as peer address for exit span
Sep 18, 2020
bd16737
add more test to cover more code
Sep 22, 2020
44a954f
minor change
Sep 25, 2020
6bef0f4
add backoff strategy
Sep 25, 2020
7c05904
fix format
Sep 25, 2020
7c80783
Merge branch 'master' of github.com:envoyproxy/envoy into skywalking
Oct 4, 2020
e57eca8
fix api
Oct 4, 2020
86da0e7
remove unused header file
Oct 4, 2020
a88e92d
some minor update
Oct 4, 2020
7b1cee9
update component id and add comment
Oct 4, 2020
0156a82
update comments for component
Oct 6, 2020
0a8d5e7
add update info
Oct 6, 2020
40150ee
Merge branch 'master' of github.com:envoyproxy/envoy into skywalking
Oct 6, 2020
8a15758
add sandbox test example for skywalking tracer
Oct 9, 2020
1ae2902
add skywalking sandbox docs.
Oct 10, 2020
fe02559
fix docs format
Oct 10, 2020
c7c148e
Merge branch 'master' of github.com:envoyproxy/envoy into skywalking
Oct 10, 2020
a8ca0fc
fix version history and docs format
Oct 10, 2020
4184636
fix for random api change
Oct 12, 2020
647679e
if start child span is set then inject tracing context by child span
Oct 12, 2020
e10a47b
create two span for skywalking tracer
Oct 15, 2020
c914203
add start child span config in sandbox yaml
Oct 16, 2020
75f5ed7
add tracing log for skywalking reporter
Oct 16, 2020
0952632
Merge branch 'master' of github.com:envoyproxy/envoy into skywalking
Oct 16, 2020
b518d3e
fix conflict
Oct 16, 2020
73a7f2d
fix format
Oct 16, 2020
3373ab8
fix header map get error
Oct 16, 2020
c58cf8f
fix tracer reporter test
Oct 17, 2020
f76ea47
fix config test
Oct 17, 2020
33d9e61
Revert "if start child span is set then inject tracing context by chi…
Oct 17, 2020
46a82ab
some minor update
Oct 17, 2020
c63db99
add some debug log
Oct 17, 2020
57348a3
make 'authentication' oneof
Oct 20, 2020
1adcbb2
add docs and fix format
Oct 20, 2020
9804a03
add annotations for authentation
Oct 21, 2020
73cd767
Merge branch 'master' of https://github.com/envoyproxy/envoy into sky…
Oct 21, 2020
b622945
fix new error after merge master
Oct 21, 2020
641d546
remove skywalking python proto library
Oct 21, 2020
ada59bc
capture value of skywalking proto config
Oct 21, 2020
0a659b3
update some comment and use 'EnvoyProxy' as default service/instance …
Oct 23, 2020
c3fa2d9
rename authentication to backend token
Oct 24, 2020
c705f4e
Merge branch 'master' of https://github.com/envoyproxy/envoy into sky…
Oct 24, 2020
69d7dd1
update sandbox
Oct 25, 2020
998c8a1
update comment
Oct 25, 2020
fbc6b93
add skywalking traceing to sandoxes docs tree
Oct 25, 2020
056c459
fix format error
Oct 26, 2020
82ef1fe
remove depends_on.condition and add 60s delay in verify.sh
Oct 26, 2020
f80844a
some updates
Oct 27, 2020
7488a66
Merge branch 'master' of https://github.com/envoyproxy/envoy into sky…
Oct 27, 2020
e4a815a
add some new log and comment
Oct 27, 2020
d9a1278
remove unnecessary config in sandbox and add new test
Oct 27, 2020
c3b30c8
fix shell format
Oct 27, 2020
b2e8661
fix typo error
Oct 28, 2020
753f79f
simplify unnecessary logic
Oct 30, 2020
32ba207
register authentication header for skywalking
Oct 30, 2020
749f69a
Merge branch 'master' of https://github.com/envoyproxy/envoy into sky…
Oct 30, 2020
ec03cb7
Merge branch 'master' of https://github.com/envoyproxy/envoy into sky…
Oct 31, 2020
8fa92a2
remove global static std::string and some minor update
Nov 1, 2020
fdc58a0
remove using namespace & wrap test by anonymous namespace
Nov 2, 2020
b93d3ff
Merge branch 'master' of https://github.com/envoyproxy/envoy into sky…
Nov 2, 2020
675f634
Merge branch 'master' of https://github.com/envoyproxy/envoy into sky…
Nov 3, 2020
f95b77d
fix docs after merge master
Nov 3, 2020
6aab97c
Kick CI
Nov 3, 2020
fe43441
anonymous namespace in header
Nov 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ extensions/filters/common/original_src @snowp @klarose
/*/extensions/tracers/datadog @cgilmour @palazzem @mattklein123
# tracers.xray extension
/*/extensions/tracers/xray @marcomagdy @lavignes @mattklein123
# tracers.skywalking extension
/*/extensions/tracers/skywalking @dio @lizan @wbpcode
htuch marked this conversation as resolved.
Show resolved Hide resolved
dio marked this conversation as resolved.
Show resolved Hide resolved
# mysql_proxy extension
/*/extensions/filters/network/mysql_proxy @rshriram @venilnoronha @mattklein123
# postgres_proxy extension
Expand Down
19 changes: 19 additions & 0 deletions api/bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def api_dependencies():
locations = REPOSITORY_LOCATIONS,
build_file_content = ZIPKINAPI_BUILD_CONTENT,
)
envoy_http_archive(
name = "com_github_apache_skywalking_data_collect_protocol",
locations = REPOSITORY_LOCATIONS,
build_file_content = SKYWALKING_DATA_COLLECT_PROTOCOL_BUILD_CONTENT,
)

PROMETHEUSMETRICS_BUILD_CONTENT = """
load("@envoy_api//bazel:api_build_system.bzl", "api_cc_py_proto_library")
Expand Down Expand Up @@ -98,3 +103,17 @@ go_proto_library(
visibility = ["//visibility:public"],
)
"""

SKYWALKING_DATA_COLLECT_PROTOCOL_BUILD_CONTENT = """
load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
cc_proto_library(
name = "protocol_cc_proto",
srcs = [
"common/Common.proto",
"language-agent/Tracing.proto",
],
default_runtime = "@com_google_protobuf//:protobuf",
protoc = "@com_google_protobuf//:protoc",
visibility = ["//visibility:public"],
)
"""
8 changes: 8 additions & 0 deletions api/bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ ZIPKINAPI_SHA256 = "688c4fe170821dd589f36ec45aaadc03a618a40283bc1f97da8fa11686fc
RULES_PROTO_GIT_SHA = "40298556293ae502c66579620a7ce867d5f57311" # Aug 17, 2020
RULES_PROTO_SHA256 = "aa1ee19226f707d44bee44c720915199c20c84a23318bb0597ed4e5c873ccbd5"

SKYWALKING_COLLECT_DATA_PROTOCOL_RELEASE = "8.1.0"
SKYWALKING_COLLECT_DATA_PROTOCOL_SHA256 = "ebea8a6968722524d1bcc4426fb6a29907ddc2902aac7de1559012d3eee90cf9"

REPOSITORY_LOCATIONS = dict(
bazel_skylib = dict(
sha256 = BAZEL_SKYLIB_SHA256,
Expand Down Expand Up @@ -63,4 +66,9 @@ REPOSITORY_LOCATIONS = dict(
strip_prefix = "zipkin-api-" + ZIPKINAPI_RELEASE,
urls = ["https://github.com/openzipkin/zipkin-api/archive/" + ZIPKINAPI_RELEASE + ".tar.gz"],
),
com_github_apache_skywalking_data_collect_protocol = dict(
sha256 = SKYWALKING_COLLECT_DATA_PROTOCOL_SHA256,
strip_prefix = "skywalking-data-collect-protocol-" + SKYWALKING_COLLECT_DATA_PROTOCOL_RELEASE,
urls = ["https://github.com/apache/skywalking-data-collect-protocol/archive/v" + SKYWALKING_COLLECT_DATA_PROTOCOL_RELEASE + ".tar.gz"],
),
)
57 changes: 57 additions & 0 deletions api/envoy/config/trace/v3/skywalking.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
syntax = "proto3";

package envoy.config.trace.v3;

import "envoy/config/core/v3/grpc_service.proto";

import "google/protobuf/wrappers.proto";

import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.config.trace.v3";
option java_outer_classname = "SkywalkingProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package =
"envoy.extensions.tracers.skywalking.v4alpha";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: SkyWalking tracer]

// Configuration for the SkyWalking tracer.
// [#extension: envoy.tracers.skywalking]
message SkyWalkingConfig {
// SkyWalking collector service.
core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];

ClientConfig client_config = 2;
}

// Client config for SkyWalking tracer.
// [#next-free-field: 6]
message ClientConfig {
// Service name for SkyWalking tracer. If service_name is empty, then cluster
// name of Envoy will be used as service name.
string service_name = 1;

// Service instance name for SkyWalking tracer. If instance_name is empty, the
// node name of Envoy will be used as service instance name.
string instance_name = 2;

// Authentication token. Set client token if backend open token
// authentication.
string authentication = 3;
wbpcode marked this conversation as resolved.
Show resolved Hide resolved

// When this field is set to true and Envoy is not the first tracing node, it
// directly uses the downstream endpoint as its own endpoint. This is helpful
// when the user wants to use the endpoint to aggregate all span data on the
// tracing link.
bool pass_endpoint = 4;

// Envoy caches the segment in memory when the backend service is temporarily
// unavailable. This field specifies the maximum number of segments that can
// be cached. If not specified, the default is 1024.
google.protobuf.UInt32Value max_cache_size = 5;
}
1 change: 1 addition & 0 deletions api/envoy/config/trace/v3/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import public "envoy/config/trace/v3/http_tracer.proto";
import public "envoy/config/trace/v3/lightstep.proto";
import public "envoy/config/trace/v3/opencensus.proto";
import public "envoy/config/trace/v3/service.proto";
import public "envoy/config/trace/v3/skywalking.proto";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import public around this proto is just for backward compatibility during re-structuring proto files, new proto doesn't have to be here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about backend_token. Because how the authentication active is based on skywalking backend setting.

import public "envoy/config/trace/v3/zipkin.proto";

option java_package = "io.envoyproxy.envoy.config.trace.v3";
Expand Down
13 changes: 13 additions & 0 deletions api/envoy/extensions/tracers/skywalking/v4alpha/BUILD

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions api/envoy/extensions/tracers/skywalking/v4alpha/skywalking.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions generated_api_shadow/bazel/repositories.bzl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions generated_api_shadow/bazel/repository_locations.bzl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 57 additions & 0 deletions generated_api_shadow/envoy/config/trace/v3/skywalking.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions generated_api_shadow/envoy/config/trace/v3/trace.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions source/extensions/extensions_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ EXTENSIONS = {
"envoy.tracers.datadog": "//source/extensions/tracers/datadog:config",
"envoy.tracers.zipkin": "//source/extensions/tracers/zipkin:config",
"envoy.tracers.opencensus": "//source/extensions/tracers/opencensus:config",
"envoy.tracers.skywalking": "//source/extensions/tracers/skywalking:config",
dio marked this conversation as resolved.
Show resolved Hide resolved
# WiP
"envoy.tracers.xray": "//source/extensions/tracers/xray:config",

Expand Down
Loading