Skip to content

Commit

Permalink
Merge branch 'main' into relax-webmock
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin authored Feb 7, 2025
2 parents b7fd402 + c175873 commit 7b35d8d
Show file tree
Hide file tree
Showing 35 changed files with 202 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ runs:
# ...but not for appraisals, sadly.
- name: Install Ruby ${{ inputs.ruby }} with dependencies
if: "${{ steps.setup.outputs.appraisals == 'false' }}"
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: "${{ inputs.ruby }}"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
Expand All @@ -95,7 +95,7 @@ runs:
# If we're using appraisals, do it all manually.
- name: Install Ruby ${{ inputs.ruby }} without dependencies
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: "${{ inputs.ruby }}"
bundler: "latest"
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,7 @@ updates:
directory: "/resources/google_cloud_platform"
schedule:
interval: weekly
- package-ecosystem: bundler
directory: "/instrumentation/grpc"
schedule:
interval: weekly
2 changes: 1 addition & 1 deletion .github/workflows/installation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v4
# ATTENTION: Dependabot does not know how to update shared actions file.
# If you see it update setup-ruby here also update it as part of actions/test_gem/action.yml
- uses: ruby/setup-ruby@v1.215.0
- uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: "Install Latest Gem Versions on ${{ matrix.ruby-version }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-hook-on-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-hook-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-perform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
- uses: ruby/setup-ruby@v1.215.0
- uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: "3.1"
bundler: latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-request-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1.215.0
uses: ruby/setup-ruby@v1.218.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
4 changes: 4 additions & 0 deletions instrumentation/action_pack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-instrumentation-action_pack

### v0.12.0 / 2025-02-04

* ADDED: Strip Rails `(.:format)` suffix from `http.route`

### v0.11.0 / 2025-01-16

* BREAKING CHANGE: Drop Support for EoL Rails 6.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module ActionPack
VERSION = '0.11.0'
VERSION = '0.12.0'
end
end
end
11 changes: 11 additions & 0 deletions instrumentation/all/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Release History: opentelemetry-instrumentation-all

### v0.73.1 / 2025-02-05

* FIXED: Add require active_storage instrumentation to `all`

### v0.73.0 / 2025-02-04

* CHANGED: opentelemetry-instrumentation-redis v0.26.1
* CHANGED: opentelemetry-instrumentation-rails v0.36.0
* CHANGED: opentelemetry-instrumentation-aws_lambda v0.3.0
* CHANGED: opentelemetry-instrumentation-action_pack v0.12.0

### v0.72.0 / 2025-01-16

* BREAKING CHANGE: Set minimum supported version to Ruby 3.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
require 'opentelemetry-instrumentation-active_record'
require 'opentelemetry-instrumentation-action_view'
require 'opentelemetry-instrumentation-action_mailer'
require 'opentelemetry-instrumentation-active_storage'
require 'opentelemetry-instrumentation-aws_sdk'
require 'opentelemetry-instrumentation-aws_lambda'
require 'opentelemetry-instrumentation-bunny'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module All
VERSION = '0.72.0'
VERSION = '0.73.1'
end
end
end
6 changes: 3 additions & 3 deletions instrumentation/all/opentelemetry-instrumentation-all.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 3.1'

spec.add_dependency 'opentelemetry-instrumentation-active_model_serializers', '~> 0.22.0'
spec.add_dependency 'opentelemetry-instrumentation-aws_lambda', '~> 0.2.0'
spec.add_dependency 'opentelemetry-instrumentation-aws_lambda', '~> 0.3.0'
spec.add_dependency 'opentelemetry-instrumentation-aws_sdk', '~> 0.8.0'
spec.add_dependency 'opentelemetry-instrumentation-bunny', '~> 0.22.0'
spec.add_dependency 'opentelemetry-instrumentation-concurrent_ruby', '~> 0.22.0'
Expand All @@ -50,10 +50,10 @@ Gem::Specification.new do |spec|
spec.add_dependency 'opentelemetry-instrumentation-que', '~> 0.9.0'
spec.add_dependency 'opentelemetry-instrumentation-racecar', '~> 0.4.0'
spec.add_dependency 'opentelemetry-instrumentation-rack', '~> 0.26.0'
spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.35.0'
spec.add_dependency 'opentelemetry-instrumentation-rails', '~> 0.36.0'
spec.add_dependency 'opentelemetry-instrumentation-rake', '~> 0.3.0'
spec.add_dependency 'opentelemetry-instrumentation-rdkafka', '~> 0.5.0'
spec.add_dependency 'opentelemetry-instrumentation-redis', '~> 0.26.0'
spec.add_dependency 'opentelemetry-instrumentation-redis', '~> 0.26.1'
spec.add_dependency 'opentelemetry-instrumentation-resque', '~> 0.6.0'
spec.add_dependency 'opentelemetry-instrumentation-restclient', '~> 0.23.0'
spec.add_dependency 'opentelemetry-instrumentation-ruby_kafka', '~> 0.22.0'
Expand Down
5 changes: 5 additions & 0 deletions instrumentation/aws_lambda/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release History: opentelemetry-instrumentation-aws_lambda

### v0.3.0 / 2025-02-04

* ADDED: AWS Lambda programmatic wrap
* FIXED: AWS Lambda test fix

### v0.2.0 / 2025-01-16

* BREAKING CHANGE: Set minimum supported version to Ruby 3.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module OpenTelemetry
module Instrumentation
module AwsLambda
VERSION = '0.2.0'
VERSION = '0.3.0'
end
end
end
1 change: 1 addition & 0 deletions instrumentation/grpc/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ inherit_from: ../../.rubocop.yml
AllCops:
Exclude:
- 'test/support/proto/*.rb'
- 'example/proto/*.rb'
20 changes: 10 additions & 10 deletions instrumentation/grpc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
## [Unreleased]
# Release History: opentelemetry-instrumentation-grpc

### v0.2.0 / 2025-01-16

* BREAKING CHANGE: Set minimum supported version to Ruby 3.1

* ADDED: Set minimum supported version to Ruby 3.1

## [0.1.3] - 2024-09-11
### v0.1.3 / 2024-09-11

- Fix error in handling of non-gRPC errors
- Fix error in method signature for OpenTelemetry::Instrumentation::Grpc.client_interceptor [#1](https://github.com/hibachrach/opentelemetry-instrumentation-grpc/pull/1)
* FIXED: Fix error in handling of non-gRPC errors
* FIXED: Fix error in method signature for OpenTelemetry::Instrumentation::Grpc.client_interceptor [#1](https://github.com/hibachrach/opentelemetry-instrumentation-grpc/pull/1)

## [0.1.2] - 2024-06-26
### v0.1.2 / 2024-06-26

- Align span naming with spec
* FIXED: Align span naming with spec

## [0.1.1] - 2024-06-26
### v0.1.1 / 2024-06-26

- Fix `uninitialized constant Interceptors` error
* FIXED: Fix `uninitialized constant Interceptors` error

## [0.1.0] - 2024-06-18
### v0.1.0 / 2024-06-18

- Initial release
* Initial release
40 changes: 24 additions & 16 deletions instrumentation/grpc/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
# OpenTelemetry::Instrumentation::Grpc
# OpenTelemetry gRPC Instrumentation
> [!CAUTION]
> This gem is not ready for release by the open-telemetry org yet, but other versions are available on RubyGems
[![Gem Version](https://badge.fury.io/rb/opentelemetry-instrumentation-grpc.svg)](https://badge.fury.io/rb/opentelemetry-instrumentation-grpc)
[![GitHub Actions CI Status](https://github.com/hibachrach/opentelemetry-instrumentation-grpc/actions/workflows/main.yml/badge.svg)](https://github.com/hibachrach/opentelemetry-instrumentation-grpc/actions?query=branch%3Amain)

OpenTelemetry instrumentation for users of the `grpc` gem
OpenTelemetry instrumentation for users of the [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) gem.

> [!WARNING]
> Right now, the gem only instruments outbound requests to gRPC services
## Installation
## How do I get started?

Install the gem and add to the application's Gemfile by executing:
Install the gem using:

```sh
$ bundle add opentelemetry-instrumentation-grpc
```console
gem install opentelemetry-instrumentation-grpc
```

If bundler is not being used to manage dependencies, install the gem by executing:
Or, if you use [bundler][bundler-home], include `opentelemetry-instrumentation-grpc` to your `Gemfile`.

```sh
$ gem install opentelemetry-instrumentation-grpc
```

## Usage

Expand All @@ -46,6 +43,10 @@ instrumentation.
end
```

## Examples

Example usage can be seen in the `./example/trace_demonstration.rb` file [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/grpc/example/trace_demonstration.rb)

## Development

Integration tests rely on a real gRPC server that is started by relevant tests. The proto definition is located in `test/support/proto/ping.proto`. Making changes to the proto definition requires re-creating gRPC-generated code. To do this, run the following command:
Expand All @@ -54,14 +55,21 @@ Integration tests rely on a real gRPC server that is started by relevant tests.
bundle exec grpc_tools_ruby_protoc --ruby_out=. --grpc_out=. test/support/proto/ping.proto
```

## Contributing
## How can I get involved?

Bug reports and pull requests are welcome on GitHub at https://github.com/open-telemetry/opentelemetry-ruby-contrib. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/CODE_OF_CONDUCT.md).
The `opentelemetry-instrumentation-grpc` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.

## License
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special interest group (SIG). You can get involved by joining us on our [GitHub Discussions][discussions-url], [Slack Channel][slack-channel] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## License

## Code of Conduct
The `opentelemetry-instrumentation-grpc` gem is distributed under the Apache 2.0 license. See [LICENSE][license-github] for more information.

Everyone interacting in the OpenTelemetry::Instrumentation::Grpc project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/CODE_OF_CONDUCT.md).
[grpc-home]: https://github.com/grpc/grpc
[bundler-home]: https://bundler.io
[repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
[slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
11 changes: 11 additions & 0 deletions instrumentation/grpc/example/example_impl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

class ExampleImpl < ::Proto::Example::ExampleAPI::Service
def example(_req, _call)
Proto::Example::ExampleResponse.new(response_name: 'Hello')
end
end
16 changes: 16 additions & 0 deletions instrumentation/grpc/example/proto/example_api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

package proto.example;

service ExampleAPI {
rpc Example(ExampleRequest) returns (ExampleResponse);
}

message ExampleRequest {
uint64 id = 1;
string name = 2;
}

message ExampleResponse {
string response_name = 1;
}
18 changes: 18 additions & 0 deletions instrumentation/grpc/example/proto/example_api_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions instrumentation/grpc/example/proto/example_api_services_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7b35d8d

Please sign in to comment.