Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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.

.idea
.git
examples
42 changes: 42 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
⚠️ Please make sure to read this template first, pull requests that don't accord with this template
maybe closed without notice.
Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
-->

<!-- ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👇 ====
### Fix <bug description or bug issue link>
- [ ] Add a unit test to verify that the fix works.
- [ ] Explain briefly why the bug exists and how to fix it.
==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👆 ==== -->

<!-- ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👇 ====
### Improve the performance of <class or module or ...>
- [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking/blob/master/oap-server/microbench/src/main/java/org/apache/skywalking/oap/server/microbench/library/datacarrier/LinkedArrayBenchmark.java)
- [ ] The benchmark result.
```text
<Paste the benchmark results here>
```
- [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👆 ==== -->

<!-- ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👇 ====
### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [ ] Update the documentation to include this new feature.
- [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.
- [ ] I have rebuilt the `Configuration.md` documentation by running `make doc-gen`
==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->

<!-- ==== 📱 Remove this line WHEN AND ONLY WHEN you're adding or modifying a plugin instrumentation, follow the checklist 👇 ====
### <Feature description>
- [ ] If adding a new plugin, add a component id in [the main repo](https://github.com/apache/skywalking/blob/master/oap-server/server-starter/src/main/resources/component-libraries.yml)
- [ ] If adding a new plugin, add a logo in [the UI repo](https://github.com/apache/skywalking-booster-ui/tree/main/src/assets/img/technologies)
- [ ] I have added the library to `pyproject.toml` (plugin group) by running `poetry add library --group plugins`
- [ ] I have rebuilt the `Plugins.md` documentation by running `make doc-gen`
==== 📱 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->

- [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue url. Closes: <URL to main repo issue>
- [ ] Update the [`CHANGELOG.md`](https://github.com/apache/skywalking-ruby/blob/main/CHANGELOG.md).
35 changes: 20 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,48 @@ on:
- main
tags:
- 'v*'
schedule:
- cron: '0 18 * * *'

concurrency:
group: CI-plugin-e2e-${{ github.event.pull_request.number || github.ref }}
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
build-and-check:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
name: Ruby ${{ matrix.ruby-version }} | Build and Check
timeout-minutes: 60
strategy:
fail-fast: true
fail-fast: false
matrix:
ruby:
- 3.2
ruby-version: [ 3.0 ]

steps:
- name: Set up Ruby
- name: Checkout source codes
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Bundler
ruby-version: ${{ matrix.ruby-version }}
- name: Check License
uses: apache/skywalking-eyes/header@3ea9df11bb3a5a85665377d1fd10c02edecf2c40
- name: Install system dependency
run: |
gem install bundler
bundle --version
bundler install
- name: RuboCop Linter
run: bundler exec rubocop

CheckStatus:
if: always()
needs:
- build
- build-and-check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Merge Requirement
run: |
if [[ ${{ needs.build.result }} != 'success' ]]; then
if [[ ${{ needs.build-and-check.result }} != 'success' ]]; then
exit -1
fi
73 changes: 73 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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: e2e

on:
pull_request:
push:
branches:
- main

concurrency:
group: e2e-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
prep-build-plugin:
name: Build matrix
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
plugins: ${{ steps.plugins.outputs.plugins }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- id: plugins
run: echo "plugins=$(ls spec/scenarios | grep -v common | jq --raw-input | jq --slurp --compact-output)" >> "$GITHUB_OUTPUT"

e2e-test:
name: Run E2E Tests | ${{ matrix.plugin }} | Ruby ${{ matrix.ruby-version }}
runs-on: ubuntu-latest
timeout-minutes: 90
needs: [ prep-build-plugin ]
strategy:
matrix:
plugin: ${{ fromJson(needs.prep-build-plugin.outputs.plugins) }}
ruby-version: [ "3.0" ]
env:
SW_RUBY_VERSION: ${{ matrix.ruby-version }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- 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 E2E tests
run: |
gem install bundler && bundle
bundle exec rspec spec/scenarios/${{ matrix.plugin }}
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-ruby

jobs:
build:
if: github.repository == 'apache/skywalking-ruby'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 150
env:
VERSION: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.HUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Polish docker image
run: |
make docker.push || make docker.push
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ build-iPhoneSimulator/
# .rubocop-https?--*
Gemfile.lock
gemfiles/*.lock
.DS_Store!
.DS_Store!
spec/workspace
36 changes: 36 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# 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.
#
header:
license:
spdx-id: Apache-2.0
copyright-owner: Apache Software Foundation

paths-ignore:
- 'licenses'
- '**/*.md'
- 'LICENSE'
- 'NOTICE'
- '.github/PULL_REQUEST_TEMPLATE'
- '**/.gitignore'
- '.gitmodules'
- 'lib/skywalking/proto/**'
- 'examples/**'
- '.rspec'

comment: on-failure
3 changes: 1 addition & 2 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--format documentation
--color
--require spec_helper
--color
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ Style/SymbolProc:
Style/ExplicitBlockArgument:
Enabled: false

Style/ClassVars:
Enabled: false

Style/CombinableDefined:
Enabled: false

#####
# Lint
#####
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ Release Notes.
------------------
#### Features
- Initialize the ruby agent core.
- Implement e2e tests.

#### Plugins
* Support [Sinatra](https://github.com/sinatra/sinatra)
* Support [redis-rb](https://github.com/redis/redis-rb)
* Support [net-http](https://github.com/ruby/net-http)

#### Documentation
* Initialize the documentation.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache SkyWalking
Copyright 2017-2024 The Apache Software Foundation
Copyright 2017-2025 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SkyWalking Ruby Agent

**This is the official documentation of SkyWalking Ruby agent. Welcome to the SkyWalking community!**

SkyWalking Ruby is an open-source auto-instrument agent that provides support for

distributed tracing across different frameworks within the Ruby language.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This documentation guides the release manager to release the SkyWalking Ruby in
## Prerequisites

1. Close (if finished, or move to next milestone otherwise) all issues in the current milestone from [skywalking-ruby](https://github.com/apache/skywalking-ruby/milestones) and [skywalking](https://github.com/apache/skywalking/milestones), create a new milestone for the next release.
1. Update [CHANGELOG.md](../CHANGELOG.md) and `version` in [Version.rb](../lib/skywalking/version.rb).
1. Update [CHANGELOG.md](../../../CHANGELOG.md) and `version` in [Version.rb](../../../lib/skywalking/version.rb).


## Add your GPG public key to Apache svn
Expand Down
Loading
Loading