Skip to content

Commit dc7b044

Browse files
Implement the core functionality of ruby agent tracing (#1)
1 parent b4e22d5 commit dc7b044

File tree

187 files changed

+6789
-8
lines changed

Some content is hidden

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

187 files changed

+6789
-8
lines changed

.github/workflows/main.yml renamed to .github/workflows/ci.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,52 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
name: Ruby
17+
name: CI
1818

1919
on:
20+
pull_request:
2021
push:
2122
branches:
2223
- main
24+
tags:
25+
- 'v*'
26+
schedule:
27+
- cron: '0 18 * * *'
28+
29+
concurrency:
30+
group: CI-plugin-e2e-${{ github.event.pull_request.number || github.ref }}
31+
cancel-in-progress: true
2332

2433
jobs:
2534
build:
2635
runs-on: ubuntu-latest
2736
name: Ruby ${{ matrix.ruby }}
2837
strategy:
38+
fail-fast: true
2939
matrix:
3040
ruby:
31-
- '3.2'
41+
- 3.2
42+
43+
steps:
44+
- name: Set up Ruby
45+
uses: ruby/setup-ruby@v1
46+
with:
47+
ruby-version: ${{ matrix.ruby }}
48+
bundler-cache: true
49+
- name: Run Bundler
50+
run: |
51+
gem install bundler
52+
bundle --version
3253
54+
CheckStatus:
55+
if: always()
56+
needs:
57+
- build
58+
runs-on: ubuntu-latest
59+
timeout-minutes: 10
3360
steps:
34-
- uses: actions/checkout@v4
35-
- name: Set up Ruby
36-
uses: ruby/setup-ruby@v1
37-
with:
38-
ruby-version: ${{ matrix.ruby }}
39-
bundler-cache: true
61+
- name: Merge Requirement
62+
run: |
63+
if [[ ${{ needs.build.result }} != 'success' ]]; then
64+
exit -1
65+
fi

.gitmodules

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

.rspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format documentation
2+
--color
3+
--require spec_helper

.rubocop.yml

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
AllCops:
17+
NewCops: enable
18+
Exclude:
19+
- 'examples/**/*'
20+
- 'skywalking.gemspec'
21+
- 'lib/skywalking/proto/**/*'
22+
- 'vendor/**/*'
23+
TargetRubyVersion: 3.0
24+
25+
require:
26+
- rubocop-performance
27+
28+
#####
29+
# Style
30+
#####
31+
Style/Alias:
32+
Enabled: false
33+
34+
Style/SymbolArray:
35+
Enabled: false
36+
37+
Style/IfUnlessModifier:
38+
Enabled: false
39+
40+
Style/RescueModifier:
41+
Enabled: false
42+
43+
Style/NumericLiterals:
44+
Enabled: false
45+
46+
Style/FormatStringToken:
47+
Enabled: false
48+
49+
Style/DoubleNegation:
50+
Enabled: false
51+
52+
Style/EmptyMethod:
53+
Enabled: false
54+
55+
Style/NumericPredicate:
56+
Enabled: false
57+
58+
Style/HashSyntax:
59+
Enabled: false
60+
61+
Style/PerlBackrefs:
62+
Enabled: false
63+
64+
Style/SpecialGlobalVars:
65+
Enabled: false
66+
67+
Style/MissingRespondToMissing:
68+
Enabled: false
69+
70+
Style/Documentation:
71+
Enabled: false
72+
73+
Style/DocumentationMethod:
74+
Enabled: false
75+
76+
Style/HashEachMethods:
77+
Enabled: true
78+
79+
Style/HashTransformKeys:
80+
Enabled: true
81+
82+
Style/FrozenStringLiteralComment:
83+
Enabled: false
84+
85+
Style/StringLiterals:
86+
Enabled: false
87+
88+
Style/RescueStandardError:
89+
Enabled: false
90+
91+
Style/SoleNestedConditional:
92+
Enabled: false
93+
94+
Style/StringConcatenation:
95+
Enabled: false
96+
97+
Style/SafeNavigation:
98+
Enabled: false
99+
100+
Style/DocumentDynamicEvalDefinition:
101+
Enabled: false
102+
103+
Style/GuardClause:
104+
Enabled: false
105+
106+
Style/CaseEquality:
107+
Enabled: false
108+
109+
Style/TrailingCommaInHashLiteral:
110+
Enabled: false
111+
112+
Style/Lambda:
113+
Enabled: false
114+
115+
Style/ArgumentsForwarding:
116+
Enabled: false
117+
118+
Style/RedundantBegin:
119+
Enabled: false
120+
121+
Style/SymbolProc:
122+
Enabled: false
123+
124+
Style/ExplicitBlockArgument:
125+
Enabled: false
126+
127+
#####
128+
# Lint
129+
#####
130+
Lint/UnusedMethodArgument:
131+
Enabled: false
132+
133+
Lint/RescueException:
134+
Enabled: false
135+
136+
Lint/SuppressedException:
137+
Enabled: false
138+
139+
Lint/ConstantDefinitionInBlock:
140+
Enabled: false
141+
142+
Lint/EmptyClass:
143+
Enabled: false
144+
145+
Lint/NoReturnInBeginEndBlocks:
146+
Enabled: false
147+
148+
Lint/LambdaWithoutLiteralBlock:
149+
Enabled: true
150+
151+
Lint/MissingSuper:
152+
Enabled: false
153+
154+
Lint/DuplicateBranch:
155+
Enabled: false
156+
157+
Lint/IncompatibleIoSelectWithFiberScheduler:
158+
Enabled: false
159+
160+
#####
161+
# Layout
162+
#####
163+
Layout/ArgumentAlignment:
164+
EnforcedStyle: with_fixed_indentation
165+
166+
Layout/ParameterAlignment:
167+
EnforcedStyle: with_fixed_indentation
168+
169+
Layout/TrailingEmptyLines:
170+
Enabled: false
171+
172+
Layout/TrailingWhitespace:
173+
Enabled: false
174+
175+
Layout/EmptyLineAfterGuardClause:
176+
Enabled: false
177+
178+
Layout/FirstParameterIndentation:
179+
Enabled: false
180+
181+
Layout/LineLength:
182+
Max: 128
183+
184+
Layout/RescueEnsureAlignment:
185+
Enabled: true
186+
187+
#####
188+
# Metrics
189+
#####
190+
Metrics/ClassLength:
191+
Enabled: false
192+
193+
Metrics/AbcSize:
194+
Enabled: false
195+
196+
Metrics/BlockLength:
197+
Enabled: false
198+
199+
Metrics/BlockNesting:
200+
Enabled: false
201+
202+
Metrics/MethodLength:
203+
Enabled: false
204+
205+
Metrics/ModuleLength:
206+
Enabled: false
207+
208+
Metrics/ParameterLists:
209+
Enabled: false
210+
211+
Metrics/CyclomaticComplexity:
212+
Enabled: false
213+
214+
Metrics/PerceivedComplexity:
215+
Enabled: false
216+
217+
#####
218+
# Naming
219+
#####
220+
Naming/AccessorMethodName:
221+
Enabled: false
222+
223+
Naming/MemoizedInstanceVariableName:
224+
Enabled: false
225+
226+
Naming/ConstantName:
227+
Enabled: false
228+
229+
#####
230+
# Performance
231+
#####
232+
Performance/Casecmp:
233+
Enabled: false
234+
235+
Performance/CollectionLiteralInLoop:
236+
Enabled: true

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Changes by Version
2+
==================
3+
Release Notes.
4+
5+
0.1.0
6+
------------------
7+
#### Features
8+
- Initialize the ruby agent core.
9+
10+
#### Plugins
11+
* Support [Sinatra](https://github.com/sinatra/sinatra)
12+
* Support [redis-rb](https://github.com/redis/redis-rb)
13+
14+
#### Documentation
15+
* Initialize the documentation.

0 commit comments

Comments
 (0)