> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langtrace.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Disable Tracing For Functions

> You can disable tracing for specific functions per vendor by passing the `disable_tracing_for_functionss` parameter in `Langtrace.init` function. The `object` should have the vendor name as the `key` and an `array` of **function names** as the `value`.

## Disable Tracing In Typescript

See below on how you can disable funciton level tracing for specific vendors:

<CodeGroup>
  ```typescript openai theme={null}
  import * as Langtrace from "@langtrase/typescript-sdk";
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      openai: [ // All supported functions for openai
        'openai.chat.completion',
        'openai.embeddings.create',
        'openai.images.edit',
        'openai.images.generate'
      ]
    }
  })
  ```

  ```typescript anthropic theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      anthropic: ['anthropic.messages.create'], // All supported functions for anthropic
    },
  });
  ```

  ```typescript llamaindex theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      llamaindex: [
        // All supported functions for llamaindex
        'llamaindex.OpenAI.chat',
        'llamaindex.RetrieverQueryEngine.query',
        'llamaindex.VectorIndexRetriever.retrieve',
        'llamaindex.SimpleVectorStore.query',
        'llamaindex.RetrieverQueryEngine.retrieve',
      ],
    },
  });
  ```

  ```typescript chromadb theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      chromadb: [
        // All supported functions for chromadb
        'chromadb.collection.add',
        'chromadb.collection.count',
        'chromadb.collection.delete',
        'chromadb.collection.modify',
        'chromadb.collection.peek',
        'chromadb.collection.query',
        'chromadb.collection.update',
      ],
    },
  });
  ```

  ```typescript cohere theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      cohere: [
        // All supported functions for cohere
        'cohere.chat',
        'cohere.chatStream',
        'cohere.embed',
        'cohere.embedJobs.create',
        'cohere.rerank',
      ],
    },
  });
  ```

  ```typescript groq theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      groq: ['groq.chat.completions.create'], // All supported functions for groq
    },
  });
  ```

  ```typescript pinecone theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      pinecone: [
        // All supported functions for pinecone
        'pinecone.index.deleteAll',
        'pinecone.index.deleteMany',
        'pinecone.index.deleteOne',
        'pinecone.index.query',
        'pinecone.index.upsert',
      ],
    },
  });
  ```

  ```typescript pg theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      pg: ['pg.Client.query'], // All supported functions for pg
    },
  });
  ```

  ```typescript qdrant theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      qdrant: [
        // All supported functions for qdrant
        'qdrantdb.count',
        'qdrantdb.delete',
        'qdrantdb.discover',
        'qdrantdb.discover_batch',
        'qdrantdb.get_collection',
        'qdrantdb.get_collections',
        'qdrantdb.recommend',
        'qdrantdb.recommend_batch',
        'qdrantdb.retrieve',
        'qdrantdb.search',
        'qdrantdb.search_batch',
        'qdrantdb.update_collection',
        'qdrantdb.update_vectors',
        'qdrantdb.upsert',
      ],
    },
  });
  ```

  ```typescript weaviate theme={null}
  import * as Langtrace from '@langtrase/typescript-sdk';
  Langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      weaviate: [
        // All supported functions for weaviate
        'batch.objectsBatcher.do',
        'batch.referencePayloadBuilder.do',
        'batch.referencesBatcher.do',
        'graphql.aggregate.do',
        'graphql.explore.do',
        'graphql.get.do',
        'graphql.raw.do',
        'schema.classCreator.do',
        'schema.classDeleter.do',
        'schema.classGetter.do',
        'schema.propertyCreator.do',
        'schema.shardsGetter.do',
        'schema.shardsUpdater.do',
        'schema.tenantExists.do',
        'schema.tenantsCreator.do',
        'schema.tenantsGetter.do',
        'schema.tenantsUpdater.do',
      ],
    },
  });
  ```
</CodeGroup>

## Disable Tracing In Python

See below on how you can disable funciton level tracing for specific vendors:

<CodeGroup>
  ```python openai theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      open_ai: [ # All supported functions for openai
        'openai.chat.completions.create',
        'openai.embeddings.create',
        'openai.images.edit',
        'openai.images.generate'
      ]
    }
  })
  ```

  ```python anthropic theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      anthropic: ['anthropic.messages.create']
    }
  })
  ```

  ```python llamaindex theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      llamaindex: [
        # All supported functions for llamaindex
        'llamaindex.OpenAI.chat',
        'llamaindex.RetrieverQueryEngine.query',
        'llamaindex.VectorIndexRetriever.retrieve',
        'llamaindex.SimpleVectorStore.query',
        'llamaindex.RetrieverQueryEngine.retrieve',
      ],
    },
  });
  ```

  ```python chromadb theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      chromadb: [
        # All supported functions for chromadb
        'chromadb.collection.add',
        'chromadb.collection.count',
        'chromadb.collection.delete',
        'chromadb.collection.modify',
        'chromadb.collection.peek',
        'chromadb.collection.query',
        'chromadb.collection.update',
      ],
    },
  });
  ```

  ```python cohere theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      cohere: [
        # All supported functions for cohere
        'cohere.client.chat',
        'cohere.client.chat_stream',
        'cohere.client.embed',
        'cohere.client.rerank',
      ],
    },
  });
  ```

  ```python groq theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      groq: ['groq.chat.completions.create'], # All supported functions for groq
    },
  });
  ```

  ```python pinecone theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      pinecone: [
        # All supported functions for pinecone
        'pinecone.index.delete',
        'pinecone.index.query',
        'pinecone.index.upsert',
      ],
    },
  });
  ```

  ```python qdrant theme={null}
  from langtrace_python_sdk import langtrace
  langtrace.init({
    write_spans_to_console: true,
    batch: false,
    disable_tracing_for_functions: {
      qdrant: [
      # All supported functions for qdrant
  		"qdrantdb.add",
  		"qdrantdb.get_collection",
  		"qdrantdb.get_collections",
  		"qdrantdb.query",
  		"qdrantdb.query_batch",
  		"qdrantdb.delete",
  		"qdrantdb.discover",
  		"qdrantdb.discover_batch",
  		"qdrantdb.recommend",
  		"qdrantdb.recommend_batch",
  		"qdrantdb.retrieve",
  		"qdrantdb.search",
  		"qdrantdb.search_batch",
  		"qdrantdb.upsert",
  		"qdrantdb.count",
  		"qdrantdb.update_collection",
  		"qdrantdb.update_vectors",
      ],
    },
  });
  ```
</CodeGroup>
