npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@datadog/openfeature-node-server

v2.5.0

Published

Node.js server bindings for OpenFeature (wraps @datadog/flagging-core)

Readme

Datadog OpenFeature Node.js Server Client

This package provides OpenFeature integration for Node.js server environments and is designed exclusively for internal Datadog use. Support is not provided for external organizations or third-party usage.

Standalone Configuration Helpers

Requires Node.js 18 or newer. Fetch and parse rules without initializing a tracer or provider. The customer-facing dd-trace/openfeature entrypoint is a separate follow-up; these examples use the internal package.

import { fetchRulesConfiguration, configurationToString } from '@datadog/openfeature-node-server/rules-based'

// The server distribution channel is the default. Rules do not depend on an evaluation context.
const configuration = await fetchRulesConfiguration({ apiKey, env: 'production' })

// For browser bootstrap data, explicitly fetch client-distributed rules.
const clientConfiguration = await fetchRulesConfiguration({
  distributionChannel: 'client',
  clientToken,
  env: 'production',
})
const wire = configurationToString(clientConfiguration)
// Pass wire through the framework's safe SSR data serializer, not raw inline HTML.

Only forward client-distributed configuration to the browser. Serialization does not remove server-only flags. The client endpoint's access controls and opt-in requirements still apply.

Initialize the browser provider from the serialized configuration:

import { configurationFromString, DatadogCoreProvider } from '@datadog/openfeature-browser/rules-based'
import { OpenFeature } from '@openfeature/web-sdk'

const provider = new DatadogCoreProvider()
provider.setConfiguration(configurationFromString(wire))
await OpenFeature.setProviderAndWait(provider, context)

The returned FlagsConfiguration is not the legacy UFC JSON accepted by DatadogNodeServerProvider.setConfiguration(). The existing Node provider is unchanged, and importing it from the root entrypoint does not load the protobuf decoder.

Fetch Options and Errors

  • distributionChannel selects the configuration channel to fetch, not where the helper runs. It defaults to server; use client when preparing configuration for browser or mobile SDKs.
  • site defaults to datadoghq.com.
  • fetch overrides global Fetch. Custom transports must honor signal and redirect: 'manual'; redirects are rejected to protect credentials.
  • timeoutMs defaults to 5000 and covers the request and response-body read. signal supports caller cancellation and earlier deadlines.
  • Failures throw ConfigurationFetchError with a code and, for HTTP errors, status. Timeouts use timeout; other caller cancellations use cancelled.

Applications own retries, polling, storage, tracking, and fallback.

End-user license agreement

https://www.datadoghq.com/legal/eula