1.0.0 • Published 4 months ago

@flipt-io/flipt v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Flipt Node

npm

This directory contains the TypeScript source code for the Flipt server-side client.

Documentation

API documentation is available at https://www.flipt.io/docs/reference/overview.

Installation

npm i @flipt-io/flipt@{version}

Usage

In the example directory, there is an example TypeScript program which imports in the flipt client, and uses it appropriately, please refer to that for how to use the client.

Metrics

There is support for Datadog RUM through this client. This allows you to track the values of feature flag evaluation and how it relates to active browser sessions.

You can first install the datadog RUM client like so:

npm install --save @datadog/browser-rum

To start tracking feature flags on Datadog:

import { datadogRum } from "@datadog/browser-rum";
import { FliptClient, FliptMetrics } from "@flipt-io/flipt";

datadogRum.init({
  applicationId: "<APPLICATION_ID>",
  clientToken: "<CLIENT_TOKEN>",
  site: "datadoghq.com",
  service: "<SERVICE_NAME>",
  env: "<ENV_NAME>",
  enableExperimentalFeatures: ["feature_flags"],
  sessionSampleRate: 100,
  sessionReplaySampleRate: 20,
  trackUserInteractions: true,
  trackResources: true,
  trackLongTasks: true,
  defaultPrivacyLevel: "mask-user-input"
});

datadogRum.startSessionReplayRecording();

const metricsClient = new FliptMetrics(
  new FliptClient({
    url: "http://localhost:8080"
  }).evaluation,
  datadogRum
);

const response = await metricsClient.variant({
  namespaceKey: "default",
  flagKey: "hello-this",
  entityId: uuidv4(),
  context: {}
});
1.0.0

4 months ago

1.0.0-rc.2

4 months ago

1.0.0-rc.1

4 months ago

0.2.17

5 months ago

0.2.15

6 months ago

0.2.12

7 months ago

0.2.11

8 months ago

0.2.10

9 months ago

0.2.7

9 months ago

0.2.8

9 months ago

0.2.6

11 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.9

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

12 months ago

0.2.4

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago