Skip to content

Commit

Permalink
Merge branch 'main' into add-dev-log-exporters
Browse files Browse the repository at this point in the history
  • Loading branch information
mwear authored Aug 28, 2024
2 parents cce6f4e + 3f96eba commit a07bcb3
Show file tree
Hide file tree
Showing 55 changed files with 1,769 additions and 579 deletions.
8 changes: 4 additions & 4 deletions .github/actions/test_gem/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ runs:
# ...but not for appraisals, sadly.
- name: Install Ruby ${{ inputs.ruby }} with dependencies
if: "${{ steps.setup.outputs.appraisals == 'false' }}"
uses: ruby/setup-ruby@v1.179.0
uses: ruby/setup-ruby@v1.190.0
with:
ruby-version: "${{ inputs.ruby }}"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
bundler: "2.5.10"
bundler: "2.5.17"
bundler-cache: true
cache-version: "v1-${{ steps.setup.outputs.cache_key }}"

# 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.179.0
uses: ruby/setup-ruby@v1.190.0
with:
ruby-version: "${{ inputs.ruby }}"
bundler: "2.5.10"
bundler: "2.5.17"
working-directory: "${{ steps.setup.outputs.gem_dir }}"
- name: Install dependencies and generate appraisals
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request
cancel-in-progress: true # Cancel any previous runs of this workflow

jobs:
base:
strategy:
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.179.0
uses: ruby/setup-ruby@v1.190.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.179.0
uses: ruby/setup-ruby@v1.190.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.179.0
uses: ruby/setup-ruby@v1.190.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/release-request-weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Open release request - Weekly

on:
schedule:
- cron: "0 15 * * 2"

jobs:
release-request:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby' }}
env:
ruby_version: "3.0"
runs-on: ubuntu-latest
steps:
- name: Install Ruby ${{ env.ruby_version }}
uses: ruby/[email protected]
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Toys
run: "gem install --no-document toys -v 0.15.5"
- name: Open release pull request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
toys release request --yes --verbose \
"--release-ref=${{ github.ref }}" \
< /dev/null
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.179.0
uses: ruby/setup-ruby@v1.190.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.179.0
uses: ruby/setup-ruby@v1.190.0
with:
ruby-version: ${{ env.ruby_version }}
- name: Checkout repo
Expand Down
4 changes: 4 additions & 0 deletions .toys/.data/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ gems:
directory: exporter/otlp
version_constant: [OpenTelemetry, Exporter, OTLP, VERSION]

- name: opentelemetry-exporter-otlp-metrics
directory: exporter/otlp-metrics
version_constant: [OpenTelemetry, Exporter, OTLP, Metrics, VERSION]

- name: opentelemetry-exporter-zipkin
directory: exporter/zipkin
version_constant: [OpenTelemetry, Exporter, Zipkin, VERSION]
Expand Down
4 changes: 4 additions & 0 deletions api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History: opentelemetry-api

### v1.4.0 / 2024-08-27

* ADDED: Include backtrace first line for better debug info

### v1.3.0 / 2024-07-24

* ADDED: Add add_link to span api/sdk
Expand Down
2 changes: 1 addition & 1 deletion api/lib/opentelemetry/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

module OpenTelemetry
## Current OpenTelemetry version
VERSION = '1.3.0'
VERSION = '1.4.0'
end
2 changes: 1 addition & 1 deletion api/opentelemetry-api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rubocop', '~> 1.30'
spec.add_development_dependency 'rubocop', '~> 1.65'
spec.add_development_dependency 'simplecov', '~> 0.17'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'
Expand Down
2 changes: 1 addition & 1 deletion common/opentelemetry-common.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rubocop', '~> 1.3'
spec.add_development_dependency 'rubocop', '~> 1.65'
spec.add_development_dependency 'simplecov', '~> 0.17'
spec.add_development_dependency 'yard', '~> 0.9'
spec.add_development_dependency 'yard-doctest', '~> 0.1.6'
Expand Down
2 changes: 1 addition & 1 deletion examples/metrics_sdk/metrics_collect_otlp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

OpenTelemetry::SDK.configure

otlp_metric_exporter = OpenTelemetry::Exporter::OTLP::MetricsExporter.new
otlp_metric_exporter = OpenTelemetry::Exporter::OTLP::Metrics::MetricsExporter.new

OpenTelemetry.meter_provider.add_metric_reader(otlp_metric_exporter)

Expand Down
2 changes: 1 addition & 1 deletion exporter/jaeger/opentelemetry-exporter-jaeger.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rspec-mocks'
spec.add_development_dependency 'rubocop', '~> 1.3'
spec.add_development_dependency 'rubocop', '~> 1.65'
spec.add_development_dependency 'simplecov', '~> 0.17'
spec.add_development_dependency 'webmock', '~> 3.7.6'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry'
spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rubocop', '~> 1.51.0'
spec.add_development_dependency 'rubocop', '~> 1.65'
spec.add_development_dependency 'simplecov', '~> 0.17'
spec.add_development_dependency 'webmock', '~> 3.7.6'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rubocop', '~> 1.51.0'
spec.add_development_dependency 'rubocop', '~> 1.65'
spec.add_development_dependency 'simplecov', '~> 0.17'
spec.add_development_dependency 'webmock', '~> 3.7.6'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'pry-byebug' unless RUBY_ENGINE == 'jruby'
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rubocop', '~> 1.51.0'
spec.add_development_dependency 'rubocop', '~> 1.65'
spec.add_development_dependency 'simplecov', '~> 0.17'
spec.add_development_dependency 'webmock', '~> 3.7.6'
spec.add_development_dependency 'yard', '~> 0.9'
Expand Down
4 changes: 4 additions & 0 deletions exporter/otlp-metrics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Release History: opentelemetry-exporter-otlp-metrics

### v0.1.0 / 2024-08-27

Initial release.
46 changes: 6 additions & 40 deletions exporter/otlp-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,55 +18,21 @@ Generally, *libraries* that produce telemetry data should avoid depending direct

This gem supports the [v0.20.0 release][otel-proto-release] of OTLP.

## Prerequisite

The exporter-oltp-metrics depends on two gems that have not been officially released: opentelemetry-metrics-sdk and opentelemetry-metrics-api.

Within the .gemspec file, these gems are not listed as dependencies. However, for users who need utilize this metrics exporter, they must first install and load these two gems before they can use the exporter.

To facilitate this, there are couple recommended approaches:

#### 1. Download the source code

1. Download the [opentelemetry-ruby](https://github.com/open-telemetry/opentelemetry-ruby).
2. Navigate to subfolder, then build the [metrics_sdk](https://github.com/open-telemetry/opentelemetry-ruby/tree/main/metrics_sdk) and [metrics_api](https://github.com/open-telemetry/opentelemetry-ruby/tree/main/metrics_api).
3. Execute `gem build *.gemspec`.
4. Lastly, install the built gem into the system.

#### 2. Using `path:` option in Gemfile with downloaded source code

git clone [opentelemetry-ruby](https://github.com/open-telemetry/opentelemetry-ruby) first, then use Gemfile

```ruby
# Gemfile
source 'https://rubygems.org'
gem 'opentelemetry-metrics-api', path: "opentelemetry-ruby/metrics_api"
gem 'opentelemetry-metrics-sdk', path: "opentelemetry-ruby/metrics_sdk"
```

#### 3. Using `git:` option in Gemfile

```ruby
# Gemfile
source 'https://rubygems.org'
gem 'opentelemetry-metrics-api', git: "https://github.com/open-telemetry/opentelemetry-ruby", glob: 'metrics_api/*.gemspec'
gem 'opentelemetry-metrics-sdk', git: "https://github.com/open-telemetry/opentelemetry-ruby", glob: 'metrics_sdk/*.gemspec'
```

## How do I get started?

Install the gem using:

```console

gem install opentelemetry-sdk
gem install opentelemetry-metrics-sdk
gem install opentelemetry-exporter-otlp-metrics

```

Or, if you use [bundler][bundler-home], include `opentelemetry-sdk` in your `Gemfile`.
Or, if you use [bundler][bundler-home], include `opentelemetry-sdk`, `opentelemetry-metrics-sdk`, and `opentelemetry-exporter-otlp-metrics` in your `Gemfile`.

Then, configure the SDK to use the OTLP metrics exporter
Then, configure the SDK to use the OTLP metrics exporter

```ruby
require 'opentelemetry/sdk'
Expand All @@ -77,7 +43,7 @@ OpenTelemetry::SDK.configure

# To start a trace you need to get a Tracer from the TracerProvider

otlp_metric_exporter = OpenTelemetry::Exporter::OTLP::MetricsExporter.new
otlp_metric_exporter = OpenTelemetry::Exporter::OTLP::Metrics::MetricsExporter.new

OpenTelemetry.meter_provider.add_metric_reader(otlp_metric_exporter)

Expand Down Expand Up @@ -112,7 +78,7 @@ The collector exporter can be configured explicitly in code, or via environment

## How can I get involved?

The `opentelemetry-exporter-otlp-metrics` gem source is [on github][repo-github], along with related gems including `opentelemetry-sdk`.
The `opentelemetry-exporter-otlp-metrics` gem source is [on github][repo-github], along with related gems including `opentelemetry-metrics-sdk`.

The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us in [GitHub Discussions][discussions-url] 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].

Expand Down Expand Up @@ -176,4 +142,4 @@ $> bundle exec rake test
[protoc-install]: https://github.com/protocolbuffers/protobuf/releases/tag/v22.5
[ruby-downloads]: https://www.ruby-lang.org/en/downloads/
[otel-proto-github]: https://github.com/open-telemetry/opentelemetry-proto
[otel-proto-release]: https://github.com/open-telemetry/opentelemetry-proto/releases/tag/v0.20.0
[otel-proto-release]: https://github.com/open-telemetry/opentelemetry-proto/releases/tag/v0.20.0
Loading

0 comments on commit a07bcb3

Please sign in to comment.