Skip to content

Commit af6fa72

Browse files
committed
Update docstrs
1 parent 3f840b4 commit af6fa72

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

packages/browser/src/integrations/featureFlags/featureFlagsIntegration.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ export interface FeatureFlagsIntegration extends Integration {
1212
}
1313

1414
/**
15-
* Sentry integration for buffering feature flags manually with an API, and
16-
* capturing them on error events. We recommend you do this on each flag
17-
* evaluation. Flags are buffered per Sentry scope and limited to 100 per event.
15+
* Sentry integration for buffering feature flag evaluations manually with an API, and
16+
* capturing them on error events and spans.
1817
*
1918
* See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
2019
*

packages/browser/src/integrations/featureFlags/launchdarkly/integration.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import type { LDContext, LDEvaluationDetail, LDInspectionFlagUsedHandler } from './types';
1010

1111
/**
12-
* Sentry integration for capturing feature flags from LaunchDarkly.
12+
* Sentry integration for capturing feature flag evaluations from LaunchDarkly.
1313
*
1414
* See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
1515
*
@@ -40,10 +40,10 @@ export const launchDarklyIntegration = defineIntegration(() => {
4040
}) satisfies IntegrationFn;
4141

4242
/**
43-
* LaunchDarkly hook that listens for flag evaluations and updates the `flags`
44-
* context in our Sentry scope. This needs to be registered as an
45-
* 'inspector' in LaunchDarkly initialize() options, separately from
46-
* `launchDarklyIntegration`. Both are needed to collect feature flags on error.
43+
* LaunchDarkly hook to listen for and buffer flag evaluations. This needs to
44+
* be registered as an 'inspector' in LaunchDarkly initialize() options,
45+
* separately from `launchDarklyIntegration`. Both the hook and the integration
46+
* are needed to capture LaunchDarkly flags.
4747
*/
4848
export function buildLaunchDarklyFlagUsedHandler(): LDInspectionFlagUsedHandler {
4949
return {

packages/browser/src/integrations/featureFlags/openfeature/integration.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
/**
2-
* OpenFeature integration.
2+
* Sentry integration for capturing OpenFeature feature flag evaluations.
33
*
4-
* Add the openFeatureIntegration() function call to your integration lists.
5-
* Add the integration hook to your OpenFeature object.
6-
* - OpenFeature.getClient().addHooks(new OpenFeatureIntegrationHook());
4+
* See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
5+
*
6+
* @example
7+
* ```
8+
* import * as Sentry from "@sentry/browser";
9+
* import { OpenFeature } from "@openfeature/web-sdk";
10+
*
11+
* Sentry.init(..., integrations: [Sentry.openFeatureIntegration()]);
12+
* OpenFeature.setProvider(new MyProviderOfChoice());
13+
* OpenFeature.addHooks(new Sentry.OpenFeatureIntegrationHook());
14+
* ```
715
*/
816
import type { Client, Event, EventHint, IntegrationFn, Span } from '@sentry/core';
917
import { defineIntegration } from '@sentry/core';

0 commit comments

Comments
 (0)