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

@dynatrace/openfeature-provider-web

v0.1.5-alpha

Published

The official Dynatrace OpenFeature provider for web.

Readme

@dynatrace/openfeature-provider-web

The official Dynatrace OpenFeature provider for web.

Questions, comments or suggestions? Reach out to [email protected].


Installation

npm install @dynatrace/openfeature-provider-web @openfeature/web-sdk
# yarn requires manual installation of the @openfeature/core peer-dependency
yarn add @dynatrace/openfeature-provider-web @openfeature/web-sdk @openfeature/core

Configuration

| Option | Type | Required | Default | Description | | -------------- | -------- | -------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | sdkKey | string | ✅ | — | Dynatrace SDK key (e.g. dt01.web_us_…). The region segment determines the OFREP endpoint; the full key is sent as the Authorization header. | | pollInterval | number | ❌ | -1 (disabled) | How often (ms) the provider polls for updated flags. Set to -1 or omit to rely solely on context-change refetches. The minimum polling interval that can be set is 1000ms. |


Usage

Basic setup

import { OpenFeature } from '@openfeature/web-sdk';
import { DynatraceProvider } from '@dynatrace/openfeature-provider-web';

const provider = new DynatraceProvider({
  sdkKey: 'dt01.web_us_…',
});

// Set evaluation context before registering the provider so the initial
// bulk evaluation includes targeting information.
await OpenFeature.setContext({ targetingKey: 'user-abc' });

// Wait until the provider has fetched all flags before evaluating.
await OpenFeature.setProviderAndWait(provider);

const client = OpenFeature.getClient();
const showBanner = client.getBooleanValue('show-banner', false);

Context changes

Calling OpenFeature.setContext() after provider registration automatically triggers a new bulk evaluation for the new context. Changed flag keys are surfaced via the PROVIDER_CONFIGURATION_CHANGED event.

// Re-evaluates all flags for the new user context.
await OpenFeature.setContext({ targetingKey: 'user-xyz', plan: 'enterprise' });

Periodic polling

Pass a pollInterval (in milliseconds) to have the provider re-fetch flags on a timer in addition to context-change triggers.

const provider = new DynatraceProvider({
  sdkKey: 'dt01.web_us_…',
  pollInterval: 60_000, // refresh every 60 seconds
});

Listening for flag changes

import { OpenFeature, ProviderEvents } from '@openfeature/web-sdk';

OpenFeature.addHandler(ProviderEvents.ConfigurationChanged, (event) => {
  console.log('Flags changed:', event?.flagsChanged);
  // Re-render components that depend on changed flags.
});

License

Apache-2.0