Skip to content

Commit

Permalink
Update 03-observability-sdk.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
mmabrouk authored Nov 19, 2024
1 parent dcf14d6 commit 79be412
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/docs/observability/03-observability-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ def rag_workflow(query:str):

```

## Excluding Inputs/Outputs Information from Capture
## Redacting sensitive data: how to exclude data from capture

In some cases, you may want to exclude parts of the inputs or outputs due to privacy concerns or because the data is too large to be stored in the span.

You can achieve this by setting the `ignore_inputs` and/or `ignore_outputs` arguments to `True` in the instrument decorator.
You can do this by setting the `ignore_inputs` and/or `ignore_outputs` arguments to `True` in the instrument decorator.

```python
@ag.instrument(
Expand All @@ -192,7 +192,7 @@ def rag_workflow(query:str):
...
```

If you need finer control, you can specify which parts of the inputs and outputs you want to exclude.
If you want more control, you can specify which parts of the inputs and outputs to exclude:

```python
@ag.instrument(
Expand All @@ -208,7 +208,7 @@ def rag_workflow(query:str, user_id:str):
}
```

If you need even finer control, you can alternatively specify a custom `redact()` callback, along with instructions in the case of errors.
For even finer control, you can use a custom `redact()` callback, along with instructions in the case of errors.

```python
def my_redact(name, field, data):
Expand All @@ -234,7 +234,7 @@ def rag_workflow(query:str, user_id:str):
}
```

Finally, if you want global guardrails, you can specify a global `redact()` callback that will be applied on top of everything else.
Finally, if you want to set up global rules for redaction, you can provide a global `redact()` callback that applies everywhere.

```python
def global_redact(
Expand Down Expand Up @@ -276,4 +276,4 @@ def rag_workflow(query:str, user_id:str):
"result": ...,
"pii": ...
}
```
```

0 comments on commit 79be412

Please sign in to comment.