splunk-otel 1.1.0 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6549c18607d6e48e41c326820885cdbcf5ed1503ccfa28f10b90b63695608a78
4
- data.tar.gz: 6a1a4884c1b09a07cc36348b9d59537972abd9c4024dbc6b1ae13199bb91091c
3
+ metadata.gz: dcf4dad70d8a6b71b55f6677d0ce9b159593dca24f132450e8c54e68c07c10b2
4
+ data.tar.gz: c1e39dd47d8db577649ef2c2512d98ff5ff273737c5c07c018704db6f2682cbd
5
5
  SHA512:
6
- metadata.gz: db4051858076eadc6dcb3cdd6e279dbf80a239a22699f8ad5590694ed1b079c0bc70c579fc3a839c346fa00ceda56b58e6263757a1f9bd516cb938836fc511e8
7
- data.tar.gz: f483859be56aa11350c2744e256c918396b0de8bd2ad31311918d889c1f0c86eae5afa69bcd5a995e88ee348a117c6a14c654e9afac1d5bba7d387925157bdde
6
+ metadata.gz: 449588970f19061697f38f64f4d69d53ce1b05fa29c9d0f73aa34d115b42436b98a6470b9107fabe5ad4269344611773466a09fcb41ca122674c6b059df59cd6
7
+ data.tar.gz: 1b700291e9eb7708a6015915d73b35c38618d64e5cabd89dce20e4ef179a70b646fb08429ee9a70d3ff8095f325912c73929fcbf26d52787cddbe2a473b779a4
@@ -22,13 +22,13 @@ jobs:
22
22
  ]
23
23
 
24
24
  steps:
25
- - uses: actions/checkout@v3.0.2
25
+ - uses: actions/checkout@v3.5.2
26
26
 
27
27
  - name: Run Collector
28
28
  run: docker-compose up -d
29
29
 
30
30
  - name: Set up Ruby ${{ matrix.rubygems.ruby }}
31
- uses: ruby/setup-ruby@v1.134.0
31
+ uses: ruby/setup-ruby@v1.149.0
32
32
  with:
33
33
  ruby-version: ${{ matrix.rubygems.ruby }}
34
34
  - name: Apply RubyGems fixes
@@ -46,7 +46,7 @@ jobs:
46
46
  - name: Run tests
47
47
  run: bundle exec appraisal ${{ matrix.rubygems.appraisal }} rake test
48
48
  - name: Upload coverage to Codecov
49
- uses: codecov/codecov-action@v3.1.1
49
+ uses: codecov/codecov-action@v3.1.3
50
50
  - name: Run basic example e2e test
51
51
  run: ruby console.rb
52
52
  working-directory: ./examples/basic/
@@ -56,7 +56,7 @@ jobs:
56
56
  test-e2e-rails-7-barebones:
57
57
  runs-on: ubuntu-20.04
58
58
  steps:
59
- - uses: actions/checkout@v3.0.2
59
+ - uses: actions/checkout@v3.5.2
60
60
  - name: Run e2e tests via Docker
61
61
  working-directory: ./examples/rails-7-barebones
62
62
  run: docker-compose up --build --exit-code-from tester
@@ -64,8 +64,8 @@ jobs:
64
64
  linkChecker:
65
65
  runs-on: ubuntu-20.04
66
66
  steps:
67
- - uses: actions/checkout@v3.0.2
67
+ - uses: actions/checkout@v3.5.2
68
68
  - name: Link Checker
69
- uses: lycheeverse/lychee-action@v1.5.1
69
+ uses: lycheeverse/lychee-action@v1.7.0
70
70
  with:
71
71
  fail: true
data/.gitlab-ci.yml CHANGED
@@ -18,7 +18,8 @@ build:
18
18
  - Gemfile.lock
19
19
  script: |
20
20
  gem update --system
21
- bundle install
21
+ gem install bundler:2.3.26
22
+ bundle _2.3.26_ install
22
23
  bundle exec rubocop
23
24
  bundle exec rake test
24
25
 
data/.rubocop.yml CHANGED
@@ -29,3 +29,9 @@ Metrics/MethodLength:
29
29
 
30
30
  Metrics/ModuleLength:
31
31
  Max: 105
32
+
33
+ Gemspec/DevelopmentDependencies:
34
+ EnforcedStyle: gemspec
35
+ Exclude:
36
+ - 'examples/rails-7-barebones/Gemfile'
37
+ - 'examples/smart-agent/Gemfile'
data/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this repository adheres to [Semantic Versioning](https://semver.org/spec/v2.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## v1.1.3 - 2023-05-24
11
+
12
+ - No changes.
13
+
14
+ ## v1.1.1 - 2023-05-24
15
+
16
+ - No significant changes.
17
+
18
+ ## v1.1.0 - 2023-01-30
19
+
20
+ - fix handling of SPLUNK_ACCESS_TOKEN to check for empty string [#114](https://github.com/signalfx/splunk-otel-ruby/pull/114)
21
+
10
22
  ## v1.0.0 - 2022-09-29
11
23
 
12
24
  ## v0.3.0 - 2022-09-28
data/CONTRIBUTING.md CHANGED
@@ -33,14 +33,17 @@ See [SECURITY.md](SECURITY.md#reporting-security-issues) for instructions.
33
33
 
34
34
  ## Documentation
35
35
 
36
- The Splunk Observability documentation is hosted on https://docs.splunk.com/Observability,
37
- which contains all the prescriptive guidance for Splunk Observability products.
38
- Prescriptive guidance consists of step-by-step instructions, conceptual material,
39
- and decision support for customers. Reference documentation and development
40
- documentation is hosted on this repository.
41
-
42
- You can send feedback about Splunk Observability docs by clicking the Feedback
43
- button on any of our documentation pages.
36
+ The Splunk Observability documentation is hosted on the [Splunk Observability
37
+ Cloud docs site](https://docs.splunk.com/Observability), which contains all the
38
+ prescriptive guidance for Splunk Observability products. Prescriptive guidance
39
+ consists of step-by-step instructions, conceptual material, and decision support
40
+ for customers. Reference documentation and development documentation is still
41
+ hosted on this repository.
42
+
43
+ To contribute documentation for this project, open a pull request in the
44
+ [public-o11y-docs](https://github.com/splunk/public-o11y-docs) repository. See
45
+ the [CONTRIBUTING.md](https://github.com/splunk/public-o11y-docs/blob/main/CONTRIBUTING.md)
46
+ guide of the Splunk Observability Cloud documentation for more information.
44
47
 
45
48
  ## Contributing via Pull Requests
46
49
 
data/README.md CHANGED
@@ -11,8 +11,8 @@
11
11
 
12
12
  The Splunk Distribution of [OpenTelemetry Instrumentation for
13
13
  Ruby](https://github.com/open-telemetry/opentelemetry-ruby) provides a gem for
14
- setup of OpenTelemetry SDK for reporting distributed traces to [Splunk
15
- APM](https://docs.splunk.com/Observability/apm/intro-to-apm.html).
14
+ setup of OpenTelemetry SDK for reporting distributed traces to Splunk
15
+ APM.
16
16
 
17
17
  This distribution comes with the following defaults:
18
18
 
@@ -24,221 +24,39 @@ This distribution comes with the following defaults:
24
24
  - Unlimited default limits for [configuration options](#trace-configuration) to
25
25
  support full-fidelity traces.
26
26
 
27
+ If you're using the SignalFx Tracing Library for Ruby and want to migrate to the Splunk Distribution of OpenTelemetry Ruby, see [Migrate from the SignalFx Tracing Library for Ruby](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.migrate) in the official documentation.
28
+
27
29
  ## Requirements
28
30
 
29
- - Ruby 2.6+
31
+ This distribution requires Ruby version 2.6 or higher.
30
32
 
31
33
  ## Get started
32
34
 
33
- This Splunk distribution comes with the following defaults:
34
-
35
- - [W3C tracecontext](https://www.w3.org/TR/trace-context/) and [W3C
36
- baggage](https://www.w3.org/TR/baggage/) context propagation.
37
- - OTLP over HTTP exporter configured to send spans to a locally running [Splunk
38
- OpenTelemetry Connector](https://github.com/signalfx/splunk-otel-collector)
39
- at http://localhost:4318.
40
- - Unlimited default limits for configuration options to support full-fidelity
41
- traces.
42
-
43
- Install the gem by adding it to your project's `Gemfile`:
44
-
45
- ``` ruby
46
- gem "splunk-otel", "~> 1.0"
47
- ```
48
-
49
- or
50
-
51
- ```shell
52
- bundle add splunk-otel --version "~> 1.0"
53
- ```
54
-
55
- Configure OpenTelemetry using the `Splunk::Otel` module from `splunk/otel`:
56
-
57
- ``` ruby
58
- require "splunk/otel"
59
- ...
60
- Splunk::Otel.configure
61
- ```
62
-
63
- ## Basic configuration
64
-
65
- The `service.name` resource attribute is the only configuration option that
66
- needs to be specified, using either the environment variable `OTEL_SERVICE_NAME`
67
- or passing as an argument to `configure`:
68
-
69
- ``` ruby
70
- Splunk::Otel.configure(service_name: "my-service")
71
- ```
72
-
73
- Other resource attributes are not strictly required, but
74
- `deployment.environment` and `service.version` are recommended to be set if they
75
- are available. These can be set through the environment variable
76
- `OTEL_RESOURCE_ATTRIBUTES`:
77
-
78
- ```
79
- OTEL_RESOURCE_ATTRIBUTES="service.version=1.2.3,deployment.environment=production"
80
- ```
81
-
82
- alternatively, if needed, more attributes can be added in code using:
83
-
84
- ```ruby
85
- Splunk::Otel.configure(service_name: "my-service") do |c|
86
- c.resource = OpenTelemetry::SDK::Resources::Resource.create(
87
- "key" => "value"
88
- )
89
- end
90
- ```
35
+ For complete instructions on how to get started with the Splunk Distribution of OpenTelemetry Ruby, see [Instrument a Ruby application for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.application) in the official documentation.
91
36
 
92
37
  ## Advanced configuration
93
38
 
94
- See [advanced-config.md](docs/advanced-config.md) for information on how to
95
- configure the instrumentation.
39
+ See [Configure the Ruby agent for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.configuration) in the official documentation.
96
40
 
97
41
  ## Correlate traces and logs
98
42
 
99
43
  You can add trace metadata to logs using the OpenTelemetry trace API. Trace
100
44
  metadata lets you explore logs in Splunk Observability Cloud.
101
45
 
102
- See [Correlating traces and logs](docs/correlating-traces-and-logs.md) for more information.
46
+ See [Connect Ruby trace data with logs for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.trace.logs) in the official documentation.
103
47
 
104
48
  ## Library instrumentation
105
49
 
106
50
  Supported libraries are listed
107
51
  [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation).
108
- The corresponding gems for the instrumentation libraries can be found under the
52
+ You can find the corresponding gems for the instrumentation libraries under the
109
53
  [opentelemetry-ruby](https://rubygems.org/profiles/opentelemetry-ruby) profile
110
54
  on [rubygems.org](https://rubygems.org).
111
55
 
112
- ### Automatic instrumentation
113
-
114
- You can enable automatic instrumentation of all libraries used in your project
115
- that have corresponding [OpenTelemetry Ruby
116
- gems](https://rubygems.org/profiles/opentelemetry-ruby) libraries by installing
117
- the
118
- [opentelemetry-instrumentation-all](https://rubygems.org/gems/opentelemetry-instrumentation-all)
119
- gem in your Gemfile:
120
-
121
- ``` ruby
122
- gem "opentelemetry-instrumentation-all", "~> 0.27"
123
- ```
124
-
125
- Enable the instrumentations from the gem by passing `auto_instrument:true` to
126
- the `configure` method of `Splunk::Otel`. For example:
127
-
128
- ``` ruby
129
- require "splunk/otel"
130
-
131
- Splunk::Otel.configure(auto_instrument: true)
132
- ```
133
-
134
- The gem fetches all instrumentation libraries but only enables those that
135
- instrument a dependency in your project. For example, it will fetch
136
- `opentelemetry-instrumentation-rack` but only if the `rack` gem is included and
137
- used in your project will the instrumentation be enabled.
138
-
139
- `auto_instrument: true` also works if individual instrumentation libraries are
140
- installed, like the `opentelemetry-instrumentation-sinatra` gem.
141
-
142
- To set configuration of one or more instrumentation libraries a config hash
143
- can be passed to `use_all`:
144
-
145
- ``` ruby
146
- OpenTelemetry::SDK.configure do |c|
147
- config = {'OpenTelemetry::Instrumentation::Redis' => { opt: "value" }}
148
- c.use_all(config)
149
- end
150
- ```
151
-
152
- The option `enabled` can be used to disable individual instrumentation libraries
153
- when using `opentelemetry-instrumentation-all`:
154
-
155
- ``` ruby
156
- OpenTelemetry::SDK.configure do |c|
157
- config = {'OpenTelemetry::Instrumentation::Redis' => { enabled: false }}
158
- c.use_all(config)
159
- end
160
- ```
161
-
162
- To enable instrumentation libraries manually, see [Manual library instrumentation](#manual-library-instrumentation).
163
-
164
- ### Manual instrumentation
165
-
166
- Documentation on how to manually instrument a Ruby application is available in the
167
- [OpenTelemetry official documentation](https://opentelemetry.io/docs/instrumentation/ruby/manual/).
168
-
169
- To extend the instrumentation with the OpenTelemetry Instrumentation for Ruby,
170
- you have to use a compatible API version.
171
-
172
- The Splunk Distribution of OpenTelemetry Ruby is compatible with:
173
-
174
- - OpenTelemetry API version 1.0.0
175
- - OpenTelemetry SDK version 1.0.0
176
-
177
- ### Manual library instrumentation
178
-
179
- Instrumentation gems can also be installed and enabled individually. This may be
180
- preferred in order to control exactly which gems are fetched when building your project.
181
-
182
- Install the instrumentation library by including it in
183
- the project's `Gemfile`. For example, to install the
184
- [Sinatra](https://rubygems.org/gems/opentelemetry-instrumentation-sinatra)
185
- instrumentation:
186
-
187
- ```
188
- gem "opentelemetry-instrumentation-sinatra", "~> 0.21"
189
- ```
190
-
191
- In a block passed to `Splunk::Otel.configure` configure the SDK to use
192
- each of the instrumentation libraries. In the case of the Sinatra instrumentation,
193
- the block would look like the following example:
194
-
195
- ``` ruby
196
- require "splunk/otel"
197
-
198
- Splunk::Otel.configure do |c|
199
- c.use "OpenTelemetry::Instrumentation::Sinatra", { opt: "value" }
200
- end
201
- ```
202
-
203
- ### Real User Monitoring
204
-
205
- For [Real User Monitoring
206
- (RUM)](https://www.splunk.com/en_us/products/real-user-monitoring.html) a
207
- [Rack](https://github.com/rack/rack) middleware is provided which will add trace
208
- context to the `Server-Timing` header in the response if there is an active
209
- Span. To use the middleware configure `Splunk::Otel` to use the `Rack`
210
- instrumentation:
211
-
212
- ``` ruby
213
- Splunk::Otel.configure do |c|
214
- c.use "OpenTelemetry::Instrumentation::Rack"
215
- end
216
- ```
217
-
218
- And add the middleware in `Rack::Builder`:
219
-
220
- ``` ruby
221
- Rack::Builder.app do
222
- use OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware
223
- use Splunk::Otel::Rack::RumMiddleware
224
- run ->(_env) { [200, { "content-type" => "text/plain" }, ["OK"]] }
225
- end
226
- ```
227
-
228
- When using [ActionPack](https://rubygems.org/gems/actionpack/), which Rails
229
- does, the middleware will be added automatically if the Instrumentation Library
230
- for ActionPack, "Splunk::Otel::Instrumentation::ActionPack", is used:
231
56
 
232
- ``` ruby
233
- Splunk::Otel.configure do |c|
234
- c.use "OpenTelemetry::Instrumentation::ActionPack"
235
- c.use "Splunk::Otel::Instrumentation::ActionPack"
236
- end
237
- ```
57
+ ## Manual instrumentation
238
58
 
239
- To disable the response headers being added the environment variable
240
- `SPLUNK_TRACE_RESPONSE_HEADER_ENABLED` can be set to `false`, or pass
241
- `trace_response_header_enabled: false` to `Splunk::Otel.configure`.
59
+ See [Manually instrument Ruby applications for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.manual.instrumentation) for instructions on how to manually instrument Ruby applications.
242
60
 
243
61
  ## Configure for use with Smart Agent
244
62
 
@@ -250,7 +68,7 @@ If the `SPLUNK_REALM` or the `OTEL_EXPORTER_JAEGER_ENDPOINT` environmental varia
250
68
 
251
69
  ## Troubleshooting
252
70
 
253
- For troubleshooting information, see the [Troubleshooting](docs/troubleshooting.md) documentation.
71
+ For troubleshooting information, see the [Troubleshoot Ruby instrumentation for Splunk Observability Cloud](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.troubleshooting) in the official documentation.
254
72
 
255
73
  # License
256
74
 
@@ -266,4 +84,3 @@ file](./LICENSE).
266
84
  >
267
85
  > 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.
268
86
 
269
- >ℹ️  SignalFx was acquired by Splunk in October 2019. See [Splunk SignalFx](https://www.splunk.com/en_us/investor-relations/acquisitions/signalfx.html) for more information.
data/RELEASING.md ADDED
@@ -0,0 +1,19 @@
1
+ # Release Process
2
+
3
+ ## Requirements
4
+
5
+ Releases to https://rubygems.org are done through Gitlab CI.
6
+
7
+ Scripts for performing the release can be found in `scripts/`. The scripts will
8
+ both create a draft Github Release and push a Gem.
9
+
10
+ ## Steps
11
+
12
+ - Update `CHANGELOG.md`
13
+ - Bump version in `lib/splunk/otel/version.rb`
14
+ - Create PR
15
+ - Once PR is approved and merged created a tag with the same version as
16
+ `version.rb` prefixed with `v` and push the tag
17
+ - Watch Gitlab CI for the `release` job to complete
18
+ - Update the newly created Github Release notes with the contents of
19
+ `CHANGELOG.md`
data/docs/README.md CHANGED
@@ -1,3 +1 @@
1
- The official documentation for this distribution can be found here:
2
-
3
- https://docs.splunk.com/Observability/gdi/get-data-in/application/ruby/get-started.html
1
+ The documentation for this distribution can be found in the [Splunk Observability Cloud official documentation](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.application).
@@ -1,3 +1,7 @@
1
+ > The official Splunk documentation for this page is [Configure the Splunk Distribution of OTel Ruby](https://quickdraw.splunk.com/redirect/?product=Observability&version=current&location=ruby.configuration).
2
+ >
3
+ > For instructions on how to contribute to the docs, see [CONTRIBUTING.md](../CONTRIBUTING.md#documentation).
4
+
1
5
  # Advanced configuration
2
6
 
3
7
  ## Trace exporters
@@ -1,7 +1,7 @@
1
1
  FROM ruby:3.1.2-buster
2
2
  RUN apt-get update -qq
3
3
  RUN apt-get install -y \
4
- nodejs="10.24.0~dfsg-1~deb10u2" \
4
+ nodejs="10.24.0~dfsg-1~deb10u3" \
5
5
  netcat=1.10-41.1
6
6
 
7
7
  # ruby comes with older versions of bundler sometimes
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Splunk
4
4
  module Otel
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.3"
6
6
  end
7
7
  end
@@ -15,4 +15,4 @@ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg -
15
15
  echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
16
16
 
17
17
  apt-get update
18
- apt-get -y install gh="2.16.1"
18
+ apt-get -y install gh
data/scripts/release.sh CHANGED
@@ -31,8 +31,10 @@ create_gh_release() {
31
31
  --title "Release $release_tag"
32
32
  }
33
33
 
34
- create_gh_release
35
-
34
+ # the gem publish for the tag is the most important so do that first
36
35
  bundle install
37
36
  bundle exec rake build
38
37
  bundle exec gem push pkg/splunk-otel-${release_version}.gem
38
+
39
+ create_gh_release
40
+
data/splunk-otel.gemspec CHANGED
@@ -36,16 +36,16 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "appraisal", "2.4.1"
37
37
  spec.add_development_dependency "bundler", "2.3.26"
38
38
  spec.add_development_dependency "rake", "13.0.6"
39
- spec.add_development_dependency "rubocop", "1.36.0"
39
+ spec.add_development_dependency "rubocop", "1.50.2"
40
40
  spec.add_development_dependency "rubocop-rake", "0.6.0"
41
- spec.add_development_dependency "simplecov", "0.21.2"
41
+ spec.add_development_dependency "simplecov", "0.22.0"
42
42
  spec.add_development_dependency "simplecov-cobertura", "2.1.0"
43
- spec.add_development_dependency "test-unit", "3.5.3"
44
- spec.add_development_dependency "tzinfo-data", "1.2022.7"
43
+ spec.add_development_dependency "test-unit", "3.5.8"
44
+ spec.add_development_dependency "tzinfo-data", "1.2023.3"
45
45
 
46
46
  # development dependencies for integration testing
47
- spec.add_development_dependency "opentelemetry-instrumentation-action_pack", "~> 0.2.0"
48
- spec.add_development_dependency "opentelemetry-instrumentation-rack", "~> 0.21.0"
47
+ spec.add_development_dependency "opentelemetry-instrumentation-action_pack", "~> 0.5.0"
48
+ spec.add_development_dependency "opentelemetry-instrumentation-rack", "~> 0.22.1"
49
49
  spec.add_development_dependency "rack", "~> 2.2"
50
50
  spec.add_development_dependency "rack-test", "~> 2.0"
51
51
  spec.add_development_dependency "rails"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splunk-otel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Splunk
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2023-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -160,14 +160,14 @@ dependencies:
160
160
  requirements:
161
161
  - - '='
162
162
  - !ruby/object:Gem::Version
163
- version: 1.36.0
163
+ version: 1.50.2
164
164
  type: :development
165
165
  prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - '='
169
169
  - !ruby/object:Gem::Version
170
- version: 1.36.0
170
+ version: 1.50.2
171
171
  - !ruby/object:Gem::Dependency
172
172
  name: rubocop-rake
173
173
  requirement: !ruby/object:Gem::Requirement
@@ -188,14 +188,14 @@ dependencies:
188
188
  requirements:
189
189
  - - '='
190
190
  - !ruby/object:Gem::Version
191
- version: 0.21.2
191
+ version: 0.22.0
192
192
  type: :development
193
193
  prerelease: false
194
194
  version_requirements: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - '='
197
197
  - !ruby/object:Gem::Version
198
- version: 0.21.2
198
+ version: 0.22.0
199
199
  - !ruby/object:Gem::Dependency
200
200
  name: simplecov-cobertura
201
201
  requirement: !ruby/object:Gem::Requirement
@@ -216,56 +216,56 @@ dependencies:
216
216
  requirements:
217
217
  - - '='
218
218
  - !ruby/object:Gem::Version
219
- version: 3.5.3
219
+ version: 3.5.8
220
220
  type: :development
221
221
  prerelease: false
222
222
  version_requirements: !ruby/object:Gem::Requirement
223
223
  requirements:
224
224
  - - '='
225
225
  - !ruby/object:Gem::Version
226
- version: 3.5.3
226
+ version: 3.5.8
227
227
  - !ruby/object:Gem::Dependency
228
228
  name: tzinfo-data
229
229
  requirement: !ruby/object:Gem::Requirement
230
230
  requirements:
231
231
  - - '='
232
232
  - !ruby/object:Gem::Version
233
- version: 1.2022.7
233
+ version: 1.2023.3
234
234
  type: :development
235
235
  prerelease: false
236
236
  version_requirements: !ruby/object:Gem::Requirement
237
237
  requirements:
238
238
  - - '='
239
239
  - !ruby/object:Gem::Version
240
- version: 1.2022.7
240
+ version: 1.2023.3
241
241
  - !ruby/object:Gem::Dependency
242
242
  name: opentelemetry-instrumentation-action_pack
243
243
  requirement: !ruby/object:Gem::Requirement
244
244
  requirements:
245
245
  - - "~>"
246
246
  - !ruby/object:Gem::Version
247
- version: 0.2.0
247
+ version: 0.5.0
248
248
  type: :development
249
249
  prerelease: false
250
250
  version_requirements: !ruby/object:Gem::Requirement
251
251
  requirements:
252
252
  - - "~>"
253
253
  - !ruby/object:Gem::Version
254
- version: 0.2.0
254
+ version: 0.5.0
255
255
  - !ruby/object:Gem::Dependency
256
256
  name: opentelemetry-instrumentation-rack
257
257
  requirement: !ruby/object:Gem::Requirement
258
258
  requirements:
259
259
  - - "~>"
260
260
  - !ruby/object:Gem::Version
261
- version: 0.21.0
261
+ version: 0.22.1
262
262
  type: :development
263
263
  prerelease: false
264
264
  version_requirements: !ruby/object:Gem::Requirement
265
265
  requirements:
266
266
  - - "~>"
267
267
  - !ruby/object:Gem::Version
268
- version: 0.21.0
268
+ version: 0.22.1
269
269
  - !ruby/object:Gem::Dependency
270
270
  name: rack
271
271
  requirement: !ruby/object:Gem::Requirement
@@ -308,7 +308,7 @@ dependencies:
308
308
  - - ">="
309
309
  - !ruby/object:Gem::Version
310
310
  version: '0'
311
- description:
311
+ description:
312
312
  email:
313
313
  - splunk-oss@splunk.com
314
314
  executables: []
@@ -328,17 +328,14 @@ files:
328
328
  - CONTRIBUTING.md
329
329
  - Gemfile
330
330
  - LICENSE
331
- - MIGRATING.md
332
331
  - README.md
332
+ - RELEASING.md
333
333
  - Rakefile
334
334
  - SECURITY.md
335
335
  - conf/otel-collector-config.yaml
336
336
  - docker-compose.yml
337
337
  - docs/README.md
338
338
  - docs/advanced-config.md
339
- - docs/correlating-traces-and-logs.md
340
- - docs/instrumenting-rails.md
341
- - docs/troubleshooting.md
342
339
  - examples/basic/README.md
343
340
  - examples/basic/collector_trace.png
344
341
  - examples/basic/console.rb
@@ -389,7 +386,7 @@ homepage: https://github.com/signalfx/splunk-otel-ruby
389
386
  licenses: []
390
387
  metadata:
391
388
  rubygems_mfa_required: 'true'
392
- post_install_message:
389
+ post_install_message:
393
390
  rdoc_options: []
394
391
  require_paths:
395
392
  - lib
@@ -404,8 +401,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
404
401
  - !ruby/object:Gem::Version
405
402
  version: '0'
406
403
  requirements: []
407
- rubygems_version: 3.2.22
408
- signing_key:
404
+ rubygems_version: 3.3.7
405
+ signing_key:
409
406
  specification_version: 4
410
407
  summary: Splunk OpenTelemetry Ruby distribution
411
408
  test_files: []
data/MIGRATING.md DELETED
@@ -1,148 +0,0 @@
1
- # Migrate from the SignalFx Tracing Library for Ruby
2
-
3
- The SignalFx Tracing Library for Ruby is scheduled to be deprecated by the end of 2022.
4
- Replace it with the Splunk Distribution of OpenTelemetry Ruby.
5
-
6
- Splunk Distribution of OpenTelemetry Ruby is based on and compatible with
7
- the OpenTelemetry Instrumentation for Ruby,
8
- an open-source project that uses the OpenTelemetry API.
9
-
10
- ## Compatibility and requirements
11
-
12
- The Splunk Distribution of OpenTelemetry Ruby requires Ruby 2.6 and
13
- higher.
14
-
15
- ## Known limitations compared to SignalFx Tracing for Ruby
16
-
17
- - Different subset of supported Ruby versions, see previous section
18
- - Currently no auto-instrumentation for:
19
- - `elasticsearch` (<https://github.com/elastic/elasticsearch-ruby>)
20
- - `grape` (<https://github.com/ruby-grape/grape>)
21
- - `sequel` (<https://github.com/jeremyevans/sequel>)
22
-
23
- More details in [OTel instrumentation equivalents](#signalfx-instrumentations-equivalents).
24
-
25
- ## Migrate to the Splunk Distribution of OpenTelemetry Ruby
26
-
27
- To migrate from the SignalFx Tracing Library for Ruby to the Splunk
28
- Distribution of OpenTelemetry Ruby, follow these steps:
29
-
30
- 1. Remove the tracing library packages.
31
- 2. Deploy the Splunk Distribution of OpenTelemetry Ruby.
32
- 3. Migrate your existing configuration.
33
-
34
- > Semantic conventions for span names and attributes change when you
35
- migrate.
36
-
37
- ### Remove the SignalFx Tracing Library for Ruby
38
-
39
- Follow these steps to remove the tracing library and its dependencies:
40
-
41
- 1. Uninstall `signalfx`:
42
-
43
- ``` bash
44
- gem uninstall signalfx
45
- ```
46
-
47
- 1. Remove `signalfx` from your Gemfile.
48
-
49
- ## Migrate to the Splunk Distribution of OpenTelemetry Ruby
50
-
51
- We're currently only testing installation using Bundler with RubyGems as a source.
52
- [Contact us](mailto:ssg-observability-instrumentals-ruby@splunk.com) if you require a different way of installation.
53
-
54
- If you installed
55
- [Smart Agent](https://github.com/signalfx/signalfx-agent)
56
- to serve as a gateway (traces/metrics data proxy)
57
- migrate to
58
- [OpenTelemetry Collector](https://docs.splunk.com/Observability/gdi/opentelemetry/resources.html)
59
- first, as soon as (if) possible.
60
-
61
- ### Deploy the Splunk Distribution of OpenTelemetry Ruby
62
-
63
- To install the Splunk Distribution of OpenTelemetry Ruby, see the [README.md](README.md).
64
-
65
- ### Replace SignalFx / OpenTracing gems with OTel equivalents
66
-
67
- 1. Make a list of all `signalfx-*` instrumentation gems from your Gemfile, see
68
- [this table](https://github.com/signalfx/signalfx-ruby-tracing#supported-libraries)
69
- for a complete list.
70
-
71
- 1. Replace them with OpenTelemetry, as per the table below.
72
-
73
- 1. Replace any other OpenTracing instrumentation packages you might have installed yourself.
74
-
75
- <a name="signalfx-instrumentations-equivalents"></a>
76
- #### OTel equivalents of SignalFx instrumentation gems
77
-
78
- | SignalFx instrumentation name | OTel instrumentation name | notes |
79
- | ----------------------------- | ------------------------- | ----- |
80
- | signalfx-activerecord-opentracing | opentelemetry-instrumentation-active_record | |
81
- | signalfx-elasticsearch-instrumentation | no known equivalents | [open issue in OTel](https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/8) |
82
- | signalfx-faraday-instrumentation | opentelemetry-instrumentation-faraday | |
83
- | signalfx-grape-instrumentation | no known equivalents | [open issue in OTel](https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/9) |
84
- | signalfgx-mongodb-instrumentation | opentelemetry-instrumentation-mongo | |
85
- | signalfx-mysql2-instrumentation | opentelemetry-instrumentation-mysql2 | |
86
- | signalfx-nethttp-instrumentation | opentelemetry-instrumentation-net_http | |
87
- | signalfx-pg-instrumentation | opentelemetry-instrumentation-pg | |
88
- | signalfx-rack-tracer | opentelemetry-instrumentation-rack | |
89
- | signalfx-rails-instrumentation | opentelemetry-instrumentation-rails | |
90
- | signalfx-redis-instrumentation | opentelemetry-instrumentation-redis | |
91
- | signalfx-restclient-instrumentation | opentelemetry-instrumentation-restclient | |
92
- | signalfx-sequel-instrumentation | no known equivalents | [open issue in OTel](https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues/11) |
93
- | signalfx-sidekiq-opentracing | opentelemetry-instrumentation-sidekiq | |
94
- | signalfx-sinatra-instrumentation | opentelemetry-instrumentation-sinatra | |
95
-
96
- #### OTel equivalents of other Open Tracing instrumentation gems
97
-
98
- See the
99
- [list of all known OTel Ruby instrumentations](https://opentelemetry.io/registry/?language=ruby&component=instrumentation)
100
- in OpenTelemetry registry.
101
-
102
- ### Migrate settings for the Splunk Distribution of OpenTelemetry Ruby
103
-
104
- 1. `SIGNALFX_ENDPOINT_URL` or `ingest_url` configuration parameter
105
- - if you installed Smart Agent and can migrate to OpenTelemetry Collector, do that first, then see the point below
106
- - if you have OpenTelemetry Collector available up as a sidecar (via `localhost`),
107
- and it accepts OTLP on default ports, just remove this setting, we export OTLP to OTel Collector by default
108
- - if you need to keep using Smart Agent, you have to set up a jaeger exporter yourself
109
- - if you export directly to our backend (without OTel Collector as a proxy),
110
- just set `SPLUNK_REALM` to your realm
111
- (it's part of the URL, ie. `https://app.<realm>.signalfx.com/`, or `us0` if it's missing)
112
-
113
- 1. `SIGNALFX_SERVICE_NAME` or `service_name` configuration parameter
114
- - to set in environment, use `OTEL_SERVICE_NAME`
115
- - to set in code, use `Splunk::Otel.configure(service_name: 'your service name', ...`
116
-
117
- 1. `SIGNALFX_ACCESS_TOKEN` or `access_token` configuration parameter
118
- - to set in environment, use `SPLUNK_ACCESS_TOKEN`
119
-
120
- 1. `SIGNALFX_SPAN_TAGS` or `span_tags` configuration parameter
121
- - to set in environment:
122
- - first, you need to rewrite the existing value to the,
123
- which has a syntax of comma-separated `<key>=<value>` pairs (e.g. `key1=value1,key2=value2`)
124
- - set `OTEL_RESOURCE_ATTRIBUTES` to the new value
125
- - to set in code:
126
- - call `OpenTelemetry::SDK::Resources::Resource.create` with a `Hash`
127
- consisting of your existing key-value pairs
128
- - pass the newly created `Resource` to the `resource=` attribute in configuration
129
- - for example:
130
- ```ruby
131
- Splunk::Otel.configure(other_args) do |c|
132
- c.resource = OpenTelemetry::SDK::Resources::Resource.create(
133
- "key" => "value"
134
- )
135
- # ...
136
- end
137
- ```
138
-
139
- 1. `SIGNALFX_RECORDED_VALUE_MAX_LENGTH`
140
- - can be set in environment using `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT`
141
- - see
142
- [the list of span limits settings](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#span-limits)
143
- to learn more
144
-
145
- 1. `tracer` configuration parameter
146
- - if you need to set its equivalent, open an issue, and tell us about your use case
147
-
148
- For more information about Splunk Ruby OTel settings, see [advanced-config.md](docs/advanced-config.md).
@@ -1,23 +0,0 @@
1
- # Correlating trace and logs
2
-
3
- ## Standard Ruby logger
4
-
5
- To add trace metadata of the current trace to logs, use the
6
- `Splunk::Otel::Logging.format_correlation` function of the
7
- [Ruby standard logger](https://ruby-doc.org/stdlib-3.1.1/libdoc/logger/rdoc/Logger.html)
8
- to set the formatter, as in the following example:
9
-
10
- ``` ruby
11
- require "splunk/otel"
12
-
13
- logger.formatter = proc do |severity, datetime, progname, msg|
14
- "#{Splunk::Otel::Logging.format_correlation} : #{msg}\n"
15
- end
16
- ```
17
-
18
- This adds `service.name=<ServiceName> trace_id=<TraceId> span_id=<SpanId>` to each log line.
19
-
20
- ```
21
- service.name=basic-service trace_id=789b159aaee2b389a8771b2588278bcf
22
- span_id=6d26eba14a81f3fa : show log correlation
23
- ```
@@ -1,46 +0,0 @@
1
- # Instrumenting Rails
2
-
3
- Install the instrumentation library by adding it to your project's `Gemfile`:
4
-
5
- ``` ruby
6
- gem "opentelemetry-instrumentation-rails", "~> 0.24"
7
- ```
8
-
9
- or install the gem using `bundle`:
10
-
11
- ```shell
12
- bundle add opentelemetry-instrumentation-rails --version "~> 0.24"
13
- ```
14
-
15
- Configure OpenTelemetry to use all available instrumentation libraries by adding the
16
- `Splunk::Otel` module from `splunk/otel` and `use_all()` method to a Rails initializer:
17
-
18
- ``` ruby
19
- # config/initializers/opentelemetry.rb
20
- require "splunk/otel"
21
- ...
22
- Splunk::Otel.configure do |c|
23
- c.use_all()
24
- end
25
- ```
26
-
27
- You can disable individual components' instrumentation as options to
28
- `use_all`. For example to disable Active Record instrumentation:
29
-
30
- ``` ruby
31
- Splunk::Otel.configure do |c|
32
- c.use_all({ 'OpenTelemetry::Instrumentation::ActiveRecord' => { enabled: false } })
33
- end
34
- ```
35
-
36
- To enable only Rails, you can use an individual `c.use`:
37
-
38
- ```ruby
39
- Splunk::Otel.configure do |c|
40
- c.use 'OpenTelemetry::Instrumentation::Rails'
41
- end
42
- ```
43
-
44
- ## Example
45
-
46
- See the [readme for Rails 7 barebones example](../examples/rails-7-barebones/README.md).
@@ -1,14 +0,0 @@
1
- # Troubleshooting
2
-
3
- ## Enable debug logging
4
-
5
- When things are not working, a good first step is to restart the program with
6
- debug logging enabled. Do this by setting the `OTEL_LOG_LEVEL` environment
7
- variable to `debug`.
8
-
9
- ```sh
10
- export OTEL_LOG_LEVEL="debug"
11
- ```
12
-
13
- Make sure to unset the environment variable after the issue is resolved, as its
14
- output might overload systems if left on indefinitely.