forked from open-telemetry/opentelemetry-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from schanjr/merge_upstream
Merge upstream
- Loading branch information
Showing
593 changed files
with
14,444 additions
and
2,627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
name: Bug report | ||
about: Notify us of an error or incorrect behaviour | ||
title: '' | ||
labels: 'bug' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
NOTE: Please use this form to submit bugs or demonstrations of non spec compliant behaviour | ||
--> | ||
|
||
**Description of the bug** | ||
|
||
<!-- | ||
If this for behaviour that is not compliant with the OpenTelemetry Specification, please describe | ||
what happened and what you expected with a link to the relevant portion of the spec. | ||
--> | ||
|
||
**Share details about your runtime** | ||
|
||
Operating system details: Linux, Ubuntu 20.04 LTS | ||
RUBY_ENGINE: "ruby" | ||
RUBY_VERSION: "2.5.3" | ||
RUBY_DESCRIPTION: "ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin19]" | ||
|
||
**Share a simplified reproduction if possible** | ||
|
||
```rb | ||
require 'bundler/inline' | ||
|
||
gemfile(true) do | ||
source 'https://rubygems.org' | ||
|
||
gem 'opentelemetry-api' | ||
gem 'opentelemetry-sdk' | ||
# gem 'opentelemetry-exporter-jaeger' | ||
# gem 'opentelemetry-exporter-otlp' | ||
# gem 'opentelemetry-exporter-zipkin' | ||
end | ||
|
||
require 'opentelemetry-api' | ||
require 'opentelemetry-sdk' | ||
|
||
span_processor = OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new( | ||
OpenTelemetry::SDK::Trace::Export::ConsoleSpanExporter.new | ||
) | ||
|
||
# require 'opentelemetry/exporter/jaeger' | ||
# exporter = OpenTelemetry::Exporter::Jaeger::AgentExporter.new(max_packet_size: 9 * 1024) | ||
# span_processor = OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(exporter) | ||
|
||
# require 'opentelemetry/shopify/exporters/otlp' | ||
# exporter = OpenTelemetry::Exporter::OTLP::Exporter.new | ||
# span_processor = OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(exporter) | ||
|
||
# require 'opentelemetry/shopify/exporters/otlp' | ||
# exporter = OpenTelemetry::Exporter::OTLP::Exporter.new | ||
# span_processor = OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(exporter) | ||
|
||
OpenTelemetry::SDK.configure do |c| | ||
c.add_span_processor(span_processor) | ||
end | ||
|
||
SimpleTracer = OpenTelemetry.tracer_provider.tracer('Bug Report') | ||
|
||
SimpleTracer.in_span('Parent span') do | ||
1..10.times { SimpleTracer.in_span('child span') {} } | ||
end | ||
|
||
OpenTelemetry.tracer_provider.shutdown | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby' }} | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Test MacOS / Ruby 3.0 | ||
os: macos-latest | ||
ruby: "3.0" | ||
# mysql2 omitted because it depends on the mysql C library which is not present | ||
# redis omitted because it depends on redis-server which is not present | ||
flags: >- | ||
--include-simple --include-appraisal --omit-services | ||
--exclude opentelemetry-instrumentation-mysql2 | ||
--exclude opentelemetry-instrumentation-redis | ||
- name: Test Windows / Ruby 3.0 | ||
os: windows-latest | ||
ruby: "3.0" | ||
# active_record omitted because it depends on tzinfo which is not present | ||
# action_pack omitted because it depends on tzinfo which is not present | ||
# ethon omitted because it depends on libcurl which is not present | ||
# mysql2 omitted because it depends on the mysql C library which is not present | ||
# pg omitted because it depends on the postgres C library which is not present | ||
# que omitted because it depends on the postgres C library which is not present | ||
# rails omitted because it depends on tzinfo which is not present | ||
# redis omitted because it depends on redis-server which is not present | ||
# sidekiq omitted because it depends on redis-server which is not present | ||
# resque omitted because it depends on redis-server which is not present | ||
flags: >- | ||
--include-simple --include-appraisal --omit-services | ||
--exclude opentelemetry-instrumentation-active_record | ||
--exclude opentelemetry-instrumentation-action_pack | ||
--exclude opentelemetry-instrumentation-ethon | ||
--exclude opentelemetry-instrumentation-mysql2 | ||
--exclude opentelemetry-instrumentation-pg | ||
--exclude opentelemetry-instrumentation-que | ||
--exclude opentelemetry-instrumentation-rails | ||
--exclude opentelemetry-instrumentation-redis | ||
--exclude opentelemetry-instrumentation-resque | ||
--exclude opentelemetry-instrumentation-sidekiq | ||
- name: Rubocop and build | ||
os: ubuntu-latest | ||
ruby: "2.7" | ||
flags: --include-simple --include-appraisal --no-check-tests --check-rubocop --check-yard --check-build | ||
fail-fast: false | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install Ruby ${{ matrix.ruby }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "${{ matrix.ruby }}" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install tools | ||
run: gem install --no-document bundler:2.1.4 toys:0.11.5 | ||
- name: Run tests | ||
run: toys ci ${{ matrix.flags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CODEQL_ENABLE_EXPERIMENTAL_FEATURES: true | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'ruby' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
tools: latest | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.