Skip to content

Commit 0d8a5be

Browse files
authored
feat(add data collect proto in go agent) (#231)
1 parent 654a593 commit 0d8a5be

94 files changed

Lines changed: 21736 additions & 194 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ jobs:
6161
- name: Run E2E Tests
6262
uses: apache/skywalking-infra-e2e@7e4b5b68716fdb7b79b21fa8908f9db497e1b115
6363
with:
64-
e2e-file: ${{ matrix.case.path }}
64+
e2e-file: ${{ matrix.case.path }}

.github/workflows/plugin-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
- go-redisv9
8181
- go-restfulv3
8282
- gorm
83-
# - kratosv2 temporary disable because it's not stable
83+
# - kratosv2 temporary disable because it's not stable
8484
- microv4
8585
- mongo
8686
- mysql
@@ -205,4 +205,4 @@ jobs:
205205
run: |
206206
if [[ ${{ needs.test.result }} != 'success' ]]; then
207207
exit -1
208-
fi
208+
fi

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ coverage.txt
88
/test/e2e/dist/
99
/test/plugins/workspace
1010
/test/plugins/dist/
11-
*.pb.go
11+
/tools/protocols/temp/
1212
vendor/
1313
VERSION

.gitmodules

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
[submodule "tools/protocols/skywalking-data-collect-protocol"]
19+
path = tools/protocols/skywalking-data-collect-protocol
20+
url = https://github.com/apache/skywalking-data-collect-protocol.git

.licenserc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ header:
3636
- '**/*.tmpl'
3737
- 'tools/go-agent/tools/testdata/*'
3838
- 'VERSION'
39+
- 'protocols'
40+
- 'tools/protocols/temp'
41+
- 'tools/protocols/skywalking-data-collect-protocol'
3942

4043
comment: on-failure
4144

CHANGES.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ Release Notes.
1010
* Support Kafka reporter.
1111
* Add recover to goroutine to prevent unexpected panics.
1212
* Add mutex to fix some data race.
13-
13+
* Replace external `goapi` dependency with in-repo generated protocols.
1414
#### Plugins
1515

1616
#### Documentation
17-
1817
#### Bug Fixes
1918

2019
* Fix plugin interceptors bypassed on Windows.

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ deps:
5757
linter:
5858
$(GO_LINT) version || curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_PATH)/bin v1.50.0
5959

60+
##@ General
61+
62+
.PHONY: generate
63+
generate: ## generate data collect proto
64+
$(SH) $(REPODIR)tools/protocols/generate.sh
65+
6066

6167
##@ Golang
6268

agent/core/compile.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ import (
5050
_ "github.com/pkg/errors"
5151

5252
//go:nolint
53-
_ "skywalking.apache.org/repo/goapi/collect/common/v3"
54-
_ "skywalking.apache.org/repo/goapi/collect/event/v3"
55-
_ "skywalking.apache.org/repo/goapi/collect/language/agent/v3"
56-
_ "skywalking.apache.org/repo/goapi/collect/language/profile/v3"
57-
_ "skywalking.apache.org/repo/goapi/collect/logging/v3"
53+
_ "github.com/apache/skywalking-go/protocols/collect/common/v3"
54+
_ "github.com/apache/skywalking-go/protocols/collect/event/v3"
55+
_ "github.com/apache/skywalking-go/protocols/collect/language/agent/v3"
56+
_ "github.com/apache/skywalking-go/protocols/collect/language/profile/v3"
57+
_ "github.com/apache/skywalking-go/protocols/collect/logging/v3"
5858
)

agent/core/tracing/compile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ import (
3030
_ "github.com/apache/skywalking-go/agent/reporter"
3131

3232
//go:nolint
33-
_ "skywalking.apache.org/repo/goapi/collect/common/v3"
34-
_ "skywalking.apache.org/repo/goapi/collect/language/agent/v3"
33+
_ "github.com/apache/skywalking-go/protocols/collect/common/v3"
34+
_ "github.com/apache/skywalking-go/protocols/collect/language/agent/v3"
3535
)

agent/reporter/imports.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ import (
6262
_ "google.golang.org/protobuf/proto"
6363

6464
// imports protocols between agent and backend
65-
_ "skywalking.apache.org/repo/goapi/collect/agent/configuration/v3"
66-
_ "skywalking.apache.org/repo/goapi/collect/common/v3"
67-
_ "skywalking.apache.org/repo/goapi/collect/ebpf/profiling/process/v3"
68-
_ "skywalking.apache.org/repo/goapi/collect/ebpf/profiling/v3"
69-
_ "skywalking.apache.org/repo/goapi/collect/event/v3"
70-
_ "skywalking.apache.org/repo/goapi/collect/language/agent/v3"
71-
_ "skywalking.apache.org/repo/goapi/collect/language/profile/v3"
72-
_ "skywalking.apache.org/repo/goapi/collect/logging/v3"
73-
_ "skywalking.apache.org/repo/goapi/collect/management/v3"
74-
_ "skywalking.apache.org/repo/goapi/collect/servicemesh/v3"
65+
_ "github.com/apache/skywalking-go/protocols/collect/agent/configuration/v3"
66+
_ "github.com/apache/skywalking-go/protocols/collect/common/v3"
67+
_ "github.com/apache/skywalking-go/protocols/collect/ebpf/profiling/process/v3"
68+
_ "github.com/apache/skywalking-go/protocols/collect/ebpf/profiling/v3"
69+
_ "github.com/apache/skywalking-go/protocols/collect/event/v3"
70+
_ "github.com/apache/skywalking-go/protocols/collect/language/agent/v3"
71+
_ "github.com/apache/skywalking-go/protocols/collect/language/profile/v3"
72+
_ "github.com/apache/skywalking-go/protocols/collect/logging/v3"
73+
_ "github.com/apache/skywalking-go/protocols/collect/management/v3"
74+
_ "github.com/apache/skywalking-go/protocols/collect/servicemesh/v3"
7575
)

0 commit comments

Comments
 (0)