Skip to content

Commit

Permalink
Add resource-detectors README
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlaurin committed May 25, 2020
1 parent e281fe0 commit 5fa5ac0
Showing 1 changed file with 41 additions and 17 deletions.
58 changes: 41 additions & 17 deletions resource-detectors/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,59 @@
# Opentelemetry::Resource::Detectors

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/opentelemetry/resource/detectors`. To experiment with that code, run `bin/console` for an interactive prompt.
The `opentelemetry-resource-detectors` gem provides resource detectors for OpenTelemetry.

TODO: Delete this and the text above, and describe your gem
## What is OpenTelemetry?

## Installation
[OpenTelemetry][opentelemetry-home] is an open source observability framework, providing a general-purpose API, SDK, and related tools required for the instrumentation of cloud-native software, frameworks, and libraries.

Add this line to your application's Gemfile:
OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from your application. You can analyze them using Prometheus, Jaeger, and other observability tools.

```ruby
gem 'opentelemetry-resource-detectors'
## How does this gem fit in?

The `opentelemetry-resource-detectors` gem provides a means of retrieving a [resource](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/sdk.md) for supported environments following the [resource semantic conventions](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/README.md).

## How do I get started?

Install the gem using:

```
gem install opentelemetry-sdk
gem install opentelemetry-resource-detectors
```

And then execute:
Or, if you use [bundler][bundler-home], include `opentelemetry-sdk` and `opentelemetry-resource-detectors` in your `Gemfile`.

$ bundle
```rb
require 'opentelemetry/sdk'
require 'opentelemetry/resource/detectors'

Or install it yourself as:
# For a specific platform
OpenTelemetry::SDK.configure do |c|
c.resource = OpenTelemetry::Resource::Detectors::GoogleCloudPlatform.detect
end

$ gem install opentelemetry-resource-detectors
# Or if you would like for it to run all detectors available
OpenTelemetry::SDK.configure do |c|
c.resource = OpenTelemetry::Resource::Detectors::AutoDetector.detect
end
```

## Usage
## How can I get involved?

TODO: Write usage instructions here
The `opentelemetry-resource-detectors` gem source is [on github][repo-github], along with related gems.

## Development
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].

After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
## License

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
The `opentelemetry-resource-detectors` gem is distributed under the Apache 2.0 license. See [LICENSE][license-github] for more information.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/opentelemetry-resource-detectors.
[opentelemetry-home]: https://opentelemetry.io
[bundler-home]: https://bundler.io
[repo-github]: https://github.com/open-telemetry/opentelemetry-ruby
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby/blob/master/LICENSE
[examples-github]: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/examples
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
[ruby-gitter]: https://gitter.im/open-telemetry/opentelemetry-ruby

0 comments on commit 5fa5ac0

Please sign in to comment.