Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flipt-io/flipt

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flipt-io/flipt

Flipt Server SDK

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-9.97%
Maintainers
1
Weekly downloads
 
Created
Source

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: {}
});

FAQs

Package last updated on 16 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc