Skip to content

Commit

Permalink
Merge branch 'master' into otlp-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
fbogsany committed Sep 8, 2020
1 parent 57cd063 commit e8ac9af
Show file tree
Hide file tree
Showing 23 changed files with 318 additions and 138 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ commands:
- run:
name: Bundle (Jaeger)
command: "cd exporter/jaeger && gem install --no-document bundler && bundle install --jobs=3 --retry=3"
- run:
name: Bundle (OTLP)
command: "cd exporter/otlp && gem install --no-document bundler && bundle install --jobs=3 --retry=3"
- run:
name: CI (API)
command: "cd api && bundle exec rake"
Expand All @@ -67,6 +70,9 @@ commands:
- run:
name: CI (Jaeger)
command: "cd exporter/jaeger && bundle exec rake"
- run:
name: CI (OTLP)
command: "cd exporter/otlp && bundle exec rake"
rake-test-appraisal:
steps:
- run:
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ GEM_INFO = {
OpenTelemetry::Exporter::Jaeger::VERSION
}
},
"opentelemetry-exporters-otlp" => {
"opentelemetry-exporter-otlp" => {
version_getter: ->() {
require './lib/opentelemetry/exporters/otlp/version.rb'
OpenTelemetry::Exporters::OTLP::VERSION
require './lib/opentelemetry/exporter/otlp/version.rb'
OpenTelemetry::Exporter::OTLP::VERSION
}
},
"opentelemetry-resource_detectors" => {
Expand Down
8 changes: 8 additions & 0 deletions ci/rake_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ printf "\nname: Bundle (Jaeger) \n"
cd exporter/jaeger && gem install --no-document bundler && bundle install --jobs=3 --retry=3
cd $root

printf "\nname: Bundle (OTLP) \n"
cd exporter/otlp && gem install --no-document bundler && bundle install --jobs=3 --retry=3
cd $root

printf "\nname: CI (API) \n"
cd api && bundle exec rake
cd $root
Expand All @@ -27,3 +31,7 @@ cd $root
printf "\nname: CI (Jaeger) \n"
cd exporter/jaeger && bundle exec rake
cd $root

printf "\nname: CI (OTLP) \n"
cd exporter/otlp && bundle exec rake
cd $root
21 changes: 21 additions & 0 deletions exporter/otlp/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
AllCops:
TargetRubyVersion: "2.5.0"
Exclude:
- "lib/opentelemetry/proto/**/*"
- "vendor/**/*"

Lint/UnusedMethodArgument:
Enabled: false
Metrics/AbcSize:
Max: 18
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Max: 21
Metrics/ParameterLists:
Enabled: false
Naming/FileName:
Exclude:
- "lib/opentelemetry-exporter-otlp.rb"
Style/ModuleFunction:
Enabled: false
1 change: 1 addition & 0 deletions exporter/otlp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Release History: opentelemetry-exporter-otlp
File renamed without changes.
File renamed without changes.
22 changes: 13 additions & 9 deletions exporters/otlp/README.md → exporter/otlp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# opentelemetry-exporters-otlp
# opentelemetry-exporter-otlp

The `opentelemetry-exporters-otlp` gem provides an OTLP exporter for OpenTelemetry for Ruby. Using `opentelemetry-exporters-otlp`, an application can configure OpenTelemetry to export collected tracing data to [the OpenTelemetry Collector][opentelemetry-collector-home].
The `opentelemetry-exporter-otlp` gem provides an [OTLP](https://github.com/open-telemetry/opentelemetry-proto) exporter for OpenTelemetry for Ruby. Using `opentelemetry-exporter-otlp`, an application can configure OpenTelemetry to export collected tracing data to [the OpenTelemetry Collector][opentelemetry-collector-home].

## What is OpenTelemetry?

Expand All @@ -10,17 +10,21 @@ OpenTelemetry provides a single set of APIs, libraries, agents, and collector se

## How does this gem fit in?

The `opentelemetry-exporters-otlp` gem is a plugin that provides OTLP export. To export to the OpenTelemetry Collector, an application can include this gem along with `opentelemetry-sdk`, and configure the `SDK` to use the provided OTLP exporter as a span processor.
The `opentelemetry-exporter-otlp` gem is a plugin that provides OTLP export. To export to the OpenTelemetry Collector, an application can include this gem along with `opentelemetry-sdk`, and configure the `SDK` to use the provided OTLP exporter as a span processor.

Generally, *libraries* that produce telemetry data should avoid depending directly on specific exporters, deferring that choice to the application developer.
Generally, *libraries* that produce telemetry data should avoid depending directly on specific exporter, deferring that choice to the application developer.

### Supported protocol version

This gem supports the [v0.4.0 release](https://github.com/open-telemetry/opentelemetry-proto/releases/tag/v0.4.0) of OTLP.

## How do I get started?

Install the gem using:

```
gem install opentelemetry-sdk
gem install opentelemetry-exporters-otlp
gem install opentelemetry-exporter-otlp
```

Or, if you use [bundler][bundler-home], include `opentelemetry-sdk` in your `Gemfile`.
Expand All @@ -29,13 +33,13 @@ Then, configure the SDK to use the OTLP exporter as a span processor, and use th

```ruby
require 'opentelemetry/sdk'
require 'opentelemetry/exporters/otlp'
require 'opentelemetry/exporter/otlp'

# Configure the sdk with custom export
OpenTelemetry::SDK.configure do |c|
c.add_span_processor(
OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
OpenTelemetry::Exporters::OTLP::Exporter.new(
OpenTelemetry::Exporter::OTLP::Exporter.new(
host: 'localhost', port: 55680
)
)
Expand Down Expand Up @@ -63,13 +67,13 @@ For additional examples, see the [examples on github][examples-github].

## How can I get involved?

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

The OpenTelemetry Ruby gems are maintained by the OpenTelemetry-Ruby special interest group (SIG). You can get involved by joining us on our [gitter channel][ruby-gitter] 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].

## License

The `opentelemetry-exporters-otlp` gem is distributed under the Apache 2.0 license. See [LICENSE][license-github] for more information.
The `opentelemetry-exporter-otlp` gem is distributed under the Apache 2.0 license. See [LICENSE][license-github] for more information.


[opentelemetry-collector-home]: https://opentelemetry.io/docs/collector/about/
Expand Down
4 changes: 2 additions & 2 deletions exporters/otlp/Rakefile → exporter/otlp/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ PROTOBUF_FILES = [
'common/v1/common.proto',
'resource/v1/resource.proto',
'trace/v1/trace.proto',
'collector/trace/v1/trace_service.proto',
]
'collector/trace/v1/trace_service.proto'
].freeze

task :update_protobuf do
system('git clone https://github.com/open-telemetry/opentelemetry-proto')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'opentelemetry/exporters/otlp'
require 'opentelemetry/exporter/otlp'
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
# SPDX-License-Identifier: Apache-2.0

require 'opentelemetry/exporters/otlp/exporter'
require 'opentelemetry/exporters/otlp/version'
require 'opentelemetry/exporter/otlp/exporter'
require 'opentelemetry/exporter/otlp/version'

# OpenTelemetry is an open source observability framework, providing a
# general-purpose API, SDK, and related tools required for the instrumentation
Expand Down
Loading

0 comments on commit e8ac9af

Please sign in to comment.