# Disable Langsmith tracing for custom routes in Langgraph server

**URL:** <https://forum.langchain.com/t/disable-langsmith-tracing-for-custom-routes-in-langgraph-server/1036>\
**Category:** Deployment\
**Created:** [August 8, 2025, 5:57pm UTC](https://forum.langchain.com/t/disable-langsmith-tracing-for-custom-routes-in-langgraph-server/1036 "2025-08-08T17:57:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tienanh](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/tienanh/32/520_2.png) [@tienanh](https://forum.langchain.com/u/tienanh)\
**Post date:** [August 8, 2025, 5:57pm UTC](https://forum.langchain.com/t/disable-langsmith-tracing-for-custom-routes-in-langgraph-server/1036/1 "2025-08-08T17:57:47Z")

</div>

Hello, i added custom routes to langgraph server by following this document [How to add custom routes - Docs by LangChain](https://docs.langchain.com/langgraph-platform/custom-routes), i’m also using Langsmith tracing to tracing my graph. Unfortunately, Langsmith also tracing these custom routes and make my data like username, password, credit card info are not secure. How can i disable tracing for these custom routes, and enable tracing my graph only?

---

<div class="post-metadata">

**Author:** ![wfh](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/wfh/32/33_2.png) [@wfh](https://forum.langchain.com/u/wfh)\
**Post date:** [August 8, 2025, 6:41pm UTC](https://forum.langchain.com/t/disable-langsmith-tracing-for-custom-routes-in-langgraph-server/1036/2 "2025-08-08T18:41:47Z")

</div>

Langsmith doesn’t trace custom routes… It just traces langgraph or traceable decorated code.

You’ll have to share more information about how you’re instrumenting your app if you want more help.

---

<div class="post-metadata">

**Author:** ![tienanh](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/tienanh/32/520_2.png) [@tienanh](https://forum.langchain.com/u/tienanh)\
**Post date:** [August 8, 2025, 7:13pm UTC](https://forum.langchain.com/t/disable-langsmith-tracing-for-custom-routes-in-langgraph-server/1036/3 "2025-08-08T19:13:20Z")

</div>

Oh, I got a bit confused — it turns out that what was traced wasn’t the custom routes themselves, but rather a tool that LangSmith automatically traced because I invoked it within the route logic. Could you please help me figure out how to disable tracing for a tool created with the `@tool` decorator?  
I’ve referred to this documentation, but it doesn’t seem to work for a function that already has the `@tool` decorator applied. [Prevent logging of sensitive data in traces | 🦜🛠 LangSmith](https://docs.smith.langchain.com/observability/how_to_guides/mask_inputs_outputs)

This solution doesn’t work.

```python
def process_rKey(inputs: dict) -> dict:
    return {"rKey": "<REDACTED>"}

@tool("check_rKey")
@traceable(run_type="tool", process_inputs=process_rKey)
def check_rKey(rKey: str) -> bool:

```
