# @types/signalfx-collect

> TypeScript definitions for signalfx-collect

Latest version **2.0.5** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/signalfx-collect
pnpm add @types/signalfx-collect
yarn add @types/signalfx-collect
bun add @types/signalfx-collect
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2025-10-24 |
| First published | 2023-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51360 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/signalfx-collect
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/signalfx-collect
- npm.io page: https://npm.io/package/@types/signalfx-collect

## Dependencies (3)

- [@types/koa](https://npm.io/package/@types/koa.md) *
- [@types/express](https://npm.io/package/@types/express.md) *
- [@types/signalfx](https://npm.io/package/@types/signalfx.md) <8

## Recent versions

- 2.0.5 (latest) — 2025-10-24
- 2.0.4 (ts5.1) — 2025-04-14
- 2.0.3 (ts4.8) — 2023-11-07
- 2.0.0 (ts4.3) — 2023-03-20
- 2.0.2 — 2023-10-18
- 2.0.1 — 2023-09-25

## README

# Installation
> `npm install --save @types/signalfx-collect`

# Summary
This package contains type definitions for signalfx-collect (https://signalfx.com).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/signalfx-collect.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/signalfx-collect/index.d.ts)
````ts
/* =================== USAGE ===================

    import * as SignalFxCollect from 'signalfx-collect';

    let config: SignalFxCollect.Config = {
        accessToken: 'MY_ACCESS_TOKEN',
        interval: 1000
    };
    const collect = new SignalFxCollect(config);
    collect.start();

 =============================================== */

import express = require("express");
import koa = require("koa");
import { SignalClient } from "signalfx";

declare class SignalFxCollect {
    constructor(config: SignalFxCollect.Config);

    // Start polling for the metrics based on a provided interval in milliseconds.
    start(): void;

    // Returns an Express or Koa middleware to register into the web server
    // The middleware collects metrics about the successfully completed requests
    getMiddleware(framework: "express"): express.RequestHandler;
    getMiddleware(framework: "koa"): koa.Middleware;
}

declare namespace SignalFxCollect {
    interface Config {
        // How often to collect and report the data, in milliseconds; default value: 10000 ms (once every 10 seconds).
        interval?: number;
        // A signalFx client already created by the caller.
        // If it is not provided, an instance of class 'Ingest' exported by package 'signalfx' is created
        // using the provided 'ingestEndpoint' and 'accessToken'.
        signalFxClient?: SignalClient;
        // Custom URL to send datapoints in format 'http://custom.domain/api/path'
        // This property is ignored if 'signalFxClient' is provided.
        ingestEndpoint?: string;
        // An access token used to authenticate on the ingest endpoint.
        // This property is required if 'signalFxClient' is not provided. It is ignored otherwise.
        accessToken?: string;
        // The logging level; one of 'debug' (more verbose) or 'info' (less verbose); default is to not log anything
        // A level for logging verbosity. Available levels are 'debug' and 'info'.
        // No log will be shown except system exceptions if the level is not specified.
        logLevel?: "debug" | "info";
        // A dictionary of additional dimensions sent with metrics and events with string keys/values.
        // Default is an empty dictionary.
        extraDimensions?: Record<string, string>;
    }
}

export = SignalFxCollect;

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/koa](https://npmjs.com/package/@types/koa), [@types/signalfx](https://npmjs.com/package/@types/signalfx)

# Credits
These definitions were written by [Valentin VĂLCIU](https://github.com/axiac).

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