<commit_before># opbeat-release-tracker

[![Build status](https://travis-ci.org/watson/opbeat-release-tracker.svg?branch=master)](https://travis-ci.org/watson/opbeat-release-tracker)

[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)

A simple module to track a release on Opbeat.

Please note that release tracking is [built
in](https://github.com/opbeat/opbeat-node#release-tracking) to the
official Opbeat node.js module.

## Installation

```
npm install opbeat-release-tracker
```

## Usage

The module exposes a single init function:

```js
var trackRelease = require('opbeat-release-trakcer')({ ... })
```

The init function takes an optional options hash with the following
properties:

- `appId` - The Opbeat app id (falls back to the `OPBEAT_APP_ID`
  environment variable)
- `organizationId` - The Opbeat organization id (falls back to the
  `OPBEAT_ORGANIZATION_ID` environment variable)
- `secretToken` - The Opbeat secret token (falls back to the
  `OPBEAT_SECRET_ID` environment variable)
- `cwd` - Directory where to auto-detect git rev or branch if those are
  not provided when tracking a release (falls back to `process.cwd()`)<commit_msg>Fix code error in README.md<commit_after># opbeat-release-tracker

[![Build status](https://travis-ci.org/watson/opbeat-release-tracker.svg?branch=master)](https://travis-ci.org/watson/opbeat-release-tracker)

[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)

A simple module to track a release on Opbeat.

Please note that release tracking is [built
in](https://github.com/opbeat/opbeat-node#release-tracking) to the
official Opbeat node.js module.

## Installation

```
npm install opbeat-release-tracker
```

## Usage

The module exposes a single init function:

```js
var trackRelease = require('opbeat-release-tracker')({ ... })
```

The init function takes an optional options hash with the following
properties:

- `appId` - The Opbeat app id (falls back to the `OPBEAT_APP_ID`
  environment variable)
- `organizationId` - The Opbeat organization id (falls back to the
  `OPBEAT_ORGANIZATION_ID` environment variable)
- `secretToken` - The Opbeat secret token (falls back to the
  `OPBEAT_SECRET_ID` environment variable)
- `cwd` - Directory where to auto-detect git rev or branch if those are
  not provided when tracking a release (falls back to `process.cwd()`)
{'fraction_non_alphanumeric': 0.12037037037037036, 'fraction_numerical': 0.0, 'mean_word_length': 4.833333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1104916', 'n_tokens_mistral': 799, 'n_tokens_neox': 768, 'n_words': 231}