amoghrajesh commented on PR #48186:
URL: https://github.com/apache/airflow/pull/48186#issuecomment-2749165596
@ashb just tested with this DAG:
```
import logging
import structlog
from airflow import DAG
from airflow.providers.standard.operators.python import PythonOperator
from airflow.sdk import Connection
log = structlog.getLogger(__name__)
def print_sensitive():
c = Connection.get("teradata_default")
log.info("Connecting", password="password")
print("Connection is", c.password)
with DAG(
dag_id="print_sensitive_data",
schedule=None,
) as dag:
print_sensitive_task = PythonOperator(
task_id="print_sensitive_task",
python_callable=print_sensitive,
)
```
The redaction is happening as I expect it to happen:

The one qn is, are we ok with "source" gettin redacted?
```
[2025-03-24, 18:49:15] INFO - DAG bundles loaded: dags-folder
source="***.dag_processing.bundles.manager.DagBundlesManager"
[2025-0[3](http://localhost:28080/dags/print_sensitive_data/runs/manual__2025-03-24T18:49:14.460932+00:00_9JfN0tZI/tasks/print_sensitive_task?try_number=1#3)-24,
18:49:15] INFO - Filling up the DagBag from /files/dags/dags/sensitive-dag.py
source="***.models.dagbag.DagBag"
[2025-03-2[4](http://localhost:28080/dags/print_sensitive_data/runs/manual__2025-03-24T18:49:14.460932+00:00_9JfN0tZI/tasks/print_sensitive_task?try_number=1#4),
18:49:15] INFO - Connecting password="***" source="task"
[202[5](http://localhost:28080/dags/print_sensitive_data/runs/manual__2025-03-24T18:49:14.460932+00:00_9JfN0tZI/tasks/print_sensitive_task?try_number=1#5)-03-24,
18:49:15] INFO - Connection is *** chan="stdout" source="task"
[2025-03-24, 18:49:15] INFO - Done. Returned value was: None
source="***.task.operators.***.providers.standard.operators.python.PythonOperator"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]