# mongo-aws-xray

Latest version **0.2.0** (published 2017-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongo-aws-xray
pnpm add mongo-aws-xray
yarn add mongo-aws-xray
bun add mongo-aws-xray
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-03-16 |
| First published | 2017-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Trey Tacon |
| Maintainers | ttacon |

## Links

- npm: https://www.npmjs.com/package/mongo-aws-xray
- Repository: https://github.com/mixmaxhq/mongo-aws-xray
- Issues: https://github.com/mixmaxhq/mongo-aws-xray/issues
- npm.io page: https://npm.io/package/mongo-aws-xray

## Dependencies (2)

- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [aws-xray-sdk](https://npm.io/package/aws-xray-sdk.md) ^1.0.5-beta

## Recent versions

- 0.2.0 (latest) — 2017-03-16
- 0.1.0 — 2017-03-16

## README

mongo-aws-xray
==============

## Installation

```sh
npm i mongo-aws-xray
```

Note that this currently only works with mongojs.


## Usage

`mongo-aws-xray` can be used in the same manner as
[aws-xray-sdk-mysql](https://www.npmjs.com/package/aws-xray-sdk-mysql). You wrap
the constructor with `captureMongo` and then create away!

```js
const { captureMongo } = require('mongo-aws-xray');
const mongojs = captureMongo(require('mongojs'));

const db = mongojs('mongodb://localhost:27017/your-db').

// This call will be instrumented and sent to XRay.
db.superCoolDB.findOne({
    foo: 'bar'
}, (err, doc) => {
    if (err) {
        console.error(err);
    } else {
        console.log(doc);
    }
});
```

---
_Source: https://npm.io/package/mongo-aws-xray · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
