Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/platforms/python/integrations/launchdarkly/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: LaunchDarkly
description: "Learn about the LaunchDarkly integration and how to add it to your integrations list."
---

The LaunchDarkly integration tracks feature flag evaluations produced by the LaunchDarkly SDK. These evaluations are held in memory and, in the event an error occurs, sent to Sentry for review and analysis.

## Install

Install `sentry-sdk` from PyPI.

```bash
pip install --upgrade 'sentry-sdk'
```

## Configure

Add `LaunchDarklyIntegration()` to your `integrations` list:

```python
import sentry_sdk
from sentry_sdk.integrations.launchdarkly import LaunchDarklyIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
integrations=[
LaunchDarklyIntegration(),
],
)
```

## Verify

The integration is tested by evaluating a feature flag using your LaunchDarkly SDK before capturing an exception.

```python
import ldclient
import sentry_sdk

client = ldclient.get()
client.variation("hello", Context.create("test-context"), False)

sentry_sdk.capture_exception(Exception("Something went wrong!"))
```

Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false".
46 changes: 46 additions & 0 deletions docs/platforms/python/integrations/openfeature/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: OpenFeature
description: "Learn about the OpenFeature integration and how to add it to your integrations list."
---

The OpenFeature integration tracks feature flag evaluations produced by the OpenFeature SDK. These evaluations are held in memory and, in the event an error occurs, sent to Sentry for review and analysis.

## Install

Install `sentry-sdk` from PyPI.

```bash
pip install --upgrade 'sentry-sdk'
```

## Configure

Add `OpenFeatureIntegration()` to your `integrations` list:

```python
import sentry_sdk
from sentry_sdk.integrations.OpenFeature import OpenFeatureIntegration

sentry_sdk.init(
dsn="___PUBLIC_DSN___",
integrations=[
OpenFeatureIntegration(),
],
)
```

## Verify

The integration is tested by evaluating a feature flag using your OpenFeature SDK before capturing an exception.

```python
from openfeature import api
import sentry_sdk

client = api.get_client()
client.get_boolean_value("hello", default_value=False)

sentry_sdk.capture_exception(Exception("Something went wrong!"))
```

Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to link to the place in the product where the flag could be found here?

Loading