Skip to content

Commit 0dbe856

Browse files
chore(anthropic): Remove include_prompts parameter (#7635)
The parameter allowed users to opt out of collecting GenAI attributes while keeping `send_default_pii=True`. It is ignored when data collection is used, and the major release drops `send_default_pii` in favor of data collection.
1 parent 71750f3 commit 0dbe856

2 files changed

Lines changed: 130 additions & 323 deletions

File tree

‎sentry_sdk/integrations/anthropic.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,6 @@ class AnthropicIntegration(Integration):
216216
identifier = "anthropic"
217217
origin = f"auto.ai.{identifier}"
218218

219-
def __init__(self: "AnthropicIntegration", include_prompts: bool = True) -> None:
220-
self.include_prompts = include_prompts
221-
222219
@staticmethod
223220
def setup_once() -> None:
224221
version = parse_version(ANTHROPIC_VERSION)
@@ -492,7 +489,7 @@ def _set_common_input_data(
492489
if has_data_collection_enabled(client.options):
493490
if client.options["data_collection"]["gen_ai"]["inputs"]:
494491
record_inputs = True
495-
elif should_send_default_pii() and integration.include_prompts:
492+
elif should_send_default_pii():
496493
record_inputs = True
497494

498495
if record_inputs:
@@ -664,7 +661,7 @@ def _set_output_data(
664661
record_outputs = False
665662
if has_data_collection_enabled(client.options):
666663
record_outputs = client.options["data_collection"]["gen_ai"]["outputs"]
667-
elif should_send_default_pii() and integration.include_prompts:
664+
elif should_send_default_pii():
668665
record_outputs = True
669666

670667
if record_outputs:

0 commit comments

Comments
 (0)