# apollo-tracing

> Collect and expose trace data for GraphQL requests

Latest version **0.16.0** (published 2022-08-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install apollo-tracing
pnpm add apollo-tracing
yarn add apollo-tracing
bun add apollo-tracing
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.16.0 |
| Published | 2022-08-18 |
| First published | 2017-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=4.0 |
| Dependencies | 2 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Apollo |
| Maintainers | apollo-bot |

## Links

- npm: https://www.npmjs.com/package/apollo-tracing
- Repository: https://github.com/apollographql/apollo-tracing-js
- Homepage: https://github.com/apollographql/apollo-tracing-js#readme
- Issues: https://github.com/apollographql/apollo-tracing-js/issues
- npm.io page: https://npm.io/package/apollo-tracing

## Dependencies (2)

- [apollo-server-env](https://npm.io/package/apollo-server-env.md) ^3.2.0
- [apollo-server-plugin-base](https://npm.io/package/apollo-server-plugin-base.md) ^0.14.0

## Recent versions

- 0.16.0 (latest) — 2022-08-18
- 0.15.0-alpha.0 (alpha) — 2021-05-26
- 0.13.1-unified2.1 (unified) — 2021-04-27
- 0.12.0-alpha.0 (next) — 2020-10-05
- 0.11.3-rc.0 (rc) — 2020-09-18
- 0.300.0-alpha.3 (next-v3) — 2020-08-12
- 0.15.0 — 2021-05-27
- 0.300.0-alpha.4 — 2021-05-06
- 0.14.0 — 2021-04-30
- 0.14.0-alpha.2 — 2021-04-30
- 0.14.0-alpha.1 — 2021-04-29
- 0.14.0-alpha.0 — 2021-04-28
- 0.13.1-unified2.0 — 2021-04-22
- 0.13.1-unified.0 — 2021-04-22
- 0.13.0 — 2021-03-26
- … 106 more at https://npm.io/package/apollo-tracing/versions

## README

# Apollo Tracing (for Node.js)

This package is used to collect and expose trace data in the [Apollo Tracing](https://github.com/apollographql/apollo-tracing) format.

It relies on instrumenting a GraphQL schema to collect resolver timings, and exposes trace data for an individual request under `extensions` as part of the GraphQL response.

This data can be consumed by [Apollo Studio](https://www.apollographql.com/docs/studio/) (previously, Apollo Engine and Apollo Graph Manager) or any other tool to provide visualization and history of field-by-field execution performance.

## Usage

### Apollo Server

Apollo Server includes built-in support for tracing from version 1.1.0 onwards.

The only code change required is to add `tracing: true` to the options passed to the `ApolloServer` constructor options for your integration of choice. For example, for [`apollo-server-express`](https://npm.im/apollo-server-express):

```javascript
const { ApolloServer } = require('apollo-server-express');

const server = new ApolloServer({
  schema,
  tracing: true,
});
```

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