Sha256: a62026468c2d61f70426a06b32477ce5774e5c4f598ce380801b862fb862e3ab

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

# elastic-apm – Elastic APM agent for Ruby (ALPHA)

[![Jenkins](https://img.shields.io/jenkins/s/https/apm-ci.elastic.co/job/elastic+apm-agent-ruby+master.svg)](https://apm-ci.elastic.co/job/elastic+apm-agent-ruby+master/) [![Gem](https://img.shields.io/gem/v/formatador.svg?style=flat-square)](https://rubygems.org/gems/elastic-apm)

This is the official Rubygem for adding [Elastic][]'s [APM][] to your Ruby app.

## Setup

Add the gem to your `Gemfile`:

```ruby
gem 'elastic-apm'
```

## Getting started with Rails

If you're using Rails the gem automatically inserts itself where it needs to be.

_Describe configuration using yaml, config, etc_

### Optional: Configure the agent

The suggested way to configure is to create a file `config/elastic_apm.yml` with your config:

```yaml
# config/elastic_apm.yml

server_url: http://localhost:8200
secret_token: YOUR_SECRET
```

## Getting started with Sinatra

```ruby
# config.ru

require 'sinatra/base'

class MySinatraApp < Sinatra::Base
  use ElasticAPM::Middleware
  
  # ...
end

# Takes optional ElasticAPM::Config values
ElasticAPM.start(
  app: MySinatraApp, # required
  server_url: 'http://localhost:8200'
)

run MySinatraApp

at_exit { ElasticAPM.stop }
```

# License

Apache 2.0

[Elastic]: https://elastic.co
[APM]: https://www.elastic.co/guide/en/apm/server/index.html

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elastic-apm-0.2.0 README.md