Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apache/skywalking-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: apache/skywalking-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing 511 changed files with 26,849 additions and 712 deletions.
7 changes: 6 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
@@ -16,18 +16,23 @@
#

github:
description: The Golang auto-instrument Agent for Apache SkyWalking, which provides the native tracing abilities for Golang projects.
description: The Golang auto-instrument Agent for Apache SkyWalking, which provides the native tracing/metrics/logging abilities for Golang projects.
homepage: https://skywalking.apache.org/
labels:
- skywalking
- observability
- apm
- distributed-tracing
- dapper
- metrics
- logging
- agent
- auto-instrumentation
enabled_merge_buttons:
squash: true
merge: false
rebase: false
dependabot_updates: false
protected_branches:
main:
required_status_checks:
127 changes: 116 additions & 11 deletions .github/workflows/plugin-tests.yaml
Original file line number Diff line number Diff line change
@@ -25,24 +25,42 @@ on:

jobs:
build:
name: Build Plugin Test
runs-on: ubuntu-latest
name: Build Plugin Test On ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.19
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install docker
brew install colima
colima start
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
submodules: true
- name: Build
run: make -C test/plugins build
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
name: Upload Test Base
with:
name: test-tools
name: test-tools-${{ matrix.os }}
path: |
test/plugins/dist
@@ -59,33 +77,120 @@ jobs:
- gin
- http
- dubbo
- go-redisv9
- go-restfulv3
- gorm
- kratosv2
- microv4
- mongo
- mysql
- zap
- logrus
- plugin_exclusion
- runtime_metrics
- mux
- grpc
- irisv12
- trace-activation
- logging-activation
- metric-activation
- fasthttp
- discard-reporter
- fiber
- echov4
- rocketmq
- amqp
- pulsar
- segmentio-kafka
- go-elasticsearchv8
- goframe
- so11y
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: test-tools
name: test-tools-ubuntu-latest
path: test/plugins/dist
- name: Setup Tools
run: |
chmod +x test/plugins/dist/*
if ls test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz; then
docker load -i test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz
fi
- name: Install docker-compose
shell: bash
run: |
if ! command docker-compose 2>&1 > /dev/null; then
echo "Installing docker-compose"
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi
- name: Run Test
run: bash test/plugins/run.sh ${{ matrix.case }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
name: Upload Agent
if: ${{ failure() }}
with:
path: test/plugins/workspace
name: test-plugins-workspace-${{ matrix.case }}
name: test-plugins-workspace-${{ matrix.case }}-ubuntu

test-on-macos:
if: false
name: gin-macos
needs:
- build
runs-on: macos-12
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/download-artifact@v4
with:
name: test-tools-macos-12
path: test/plugins/dist
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install docker docker-compose
brew install colima
colima start
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Setup Tools
run: |
chmod +x test/plugins/dist/*
if ls test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz; then
docker load -i test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz
fi
- name: Install docker-compose
shell: bash
run: |
if ! command docker-compose 2>&1 > /dev/null; then
echo "Installing docker-compose"
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi
- name: Run Test
run: bash test/plugins/run.sh short_versions_gin
- uses: actions/upload-artifact@v4
name: Upload Agent
if: ${{ failure() }}
with:
path: test/plugins/workspace
name: test-plugins-workspace-gin-macos

required:
if: always()
@@ -99,4 +204,4 @@ jobs:
run: |
if [[ ${{ needs.test.result }} != 'success' ]]; then
exit -1
fi
fi
49 changes: 49 additions & 0 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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.

name: publish-docker

on:
push:
branches:
- main

env:
HUB: ghcr.io/apache/skywalking-go

jobs:
build:
if: github.repository == 'apache/skywalking-go'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 150
env:
VERSION: ${{ github.sha }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Log in to the Container registry
uses: docker/login-action@v1.10.0
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Polish docker image
run: |
make docker.push || make docker.push
10 changes: 5 additions & 5 deletions .github/workflows/skywalking-go.yaml
Original file line number Diff line number Diff line change
@@ -25,10 +25,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.19
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
@@ -47,9 +47,9 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ ubuntu, macos, windows ]
go-version: [ 1.18, 1.19 ]
runs-on: ${{ matrix.os }}-latest
os: [ ubuntu-latest, windows-latest ]
go-version: [ 1.19 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Set up Go ${{ matrix.go-version }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -7,4 +7,6 @@
coverage.txt
/test/plugins/workspace
/test/plugins/dist/
*.pb.go
*.pb.go
vendor/
VERSION
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -93,9 +93,10 @@ linters:
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
disable:
- unused

service:
golangci-lint-version: 1.20.x
4 changes: 3 additions & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -34,9 +34,11 @@ header:
- '.gitignore'
- 'dist/LICENSE.tpl'
- '**/*.tmpl'
- 'tools/go-agent/tools/testdata/*'
- 'VERSION'

comment: on-failure

dependency:
files:
- go.mod
- go.mod
Loading