Skip to content

Commit

Permalink
squash: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Kayla Reopelle <[email protected]>
  • Loading branch information
arielvalentin and kaylareopelle authored Jan 24, 2025
1 parent db50b48 commit efae497
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .toys/.data/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ commit_lint:
gems:
- name: opentelemetry-helpers-sql
directory: helpers/sql
version_constant: [OpenTelemetry, helpers, Sql, VERSION]
version_constant: [OpenTelemetry, Helpers, Sql, VERSION]

- name: opentelemetry-instrumentation-gruf
directory: instrumentation/gruf
Expand Down
6 changes: 3 additions & 3 deletions helpers/sql/.yardopts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--no-private
--title=OpenTelemetry Sql Instrumentation
--title=OpenTelemetry Sql Helpers
--markup=markdown
--main=README.md
./lib/opentelemetry/instrumentation/**/*.rb
./lib/opentelemetry/instrumentation.rb
./lib/opentelemetry/helpers/**/*.rb
./lib/opentelemetry/helpers.rb
-
README.md
CHANGELOG.md
2 changes: 1 addition & 1 deletion helpers/sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Or, if you use [bundler][bundler-home], include `opentelemetry-helpers-sql` in y

This gem is intended to be used by the instrumentation libraries to provide a common set of helpers for SQL-related spans. It is not intended to be used directly by applications.

Some Database libraries do not have enough context to add sufficient details to client spans. In these cases, you can use the `OpenTelemetry::Helpers::Sql.with_attributes` to create a set of shared attributes to amend to a database span.
Some database libraries do not have enough context to add sufficient details to client spans. In these cases, you can use the `OpenTelemetry::Helpers::Sql.with_attributes` to create a set of shared attributes to amend to a database span.

```ruby
# Higher-level instrumentation e.g. ORM
Expand Down
4 changes: 2 additions & 2 deletions helpers/sql/lib/opentelemetry/helpers/sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

module OpenTelemetry
module Helpers
# Contains the OpenTelemetry instrumentation for the Sql gem
# Contains helpers for OpenTelemetry instrumentation related to SQL
module Sql
extend self

CURRENT_ATTRIBUTES_KEY = Context.create_key('sql-attributes-hash')

private_constant :CURRENT_ATTRIBUTES_KEY

# Returns the attributes hash representing the Trilogy context found
# Returns the attributes hash representing the SQL adapter context found
# in the optional context or the current context if none is provided.
#
# @param [optional Context] context The context to lookup the current
Expand Down
10 changes: 5 additions & 5 deletions helpers/sql/opentelemetry-helpers-sql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Gem::Specification.new do |spec|
spec.authors = ['OpenTelemetry Authors']
spec.email = ['[email protected]']

spec.summary = 'Sql helpers for the OpenTelemetry framework'
spec.description = 'Sql helpers for the OpenTelemetry framework'
spec.summary = 'SQL helpers for the OpenTelemetry framework'
spec.description = 'SQL helpers for the OpenTelemetry framework'
spec.homepage = 'https://github.com/open-telemetry/opentelemetry-ruby-contrib'
spec.license = 'Apache-2.0'

spec.files = Dir.glob('lib/**/*.rb') +
Dir.glob('*.md') +
['LICENSE', '.yardopts']
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 3.0'
spec.required_ruby_version = '>= 3.1'

spec.add_dependency 'opentelemetry-api', '~> 1.4.0'

Expand All @@ -32,8 +32,8 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rubocop', '~> 1.68.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.22.0'
spec.add_development_dependency 'rubocop', '~> 1.71.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.23.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
spec.add_development_dependency 'yard', '~> 0.9'

Expand Down

0 comments on commit efae497

Please sign in to comment.