Embedding operations are also automatically instrumented:
embeddings = client.embeddings( model="llama2", prompt="The quick brown fox jumps over the lazy dog")print(embeddings['embedding'])
const embeddings = await ollama.embeddings({ model: "llama2", prompt: "The quick brown fox jumps over the lazy dog"});console.log(embeddings.embedding);
Control which integrations are enabled using the instruments or blockInstruments configuration:
from netra import Netrafrom netra.instrumentation.instruments import InstrumentSet# Only enable Ollama instrumentationNetra.init( headers=f"x-api-key={os.environ.get('NETRA_API_KEY')}", instruments={InstrumentSet.OLLAMA})# Or block specific instrumentationsNetra.init( headers=f"x-api-key={os.environ.get('NETRA_API_KEY')}", block_instruments={InstrumentSet.HTTPX})
import { Netra, NetraInstruments } from "netra-sdk";// Only enable Ollama instrumentationawait Netra.init({ headers: `x-api-key=${process.env.NETRA_API_KEY}`, instruments: new Set([NetraInstruments.OLLAMA])});// Or block specific instrumentationsawait Netra.init({ headers: `x-api-key=${process.env.NETRA_API_KEY}`, blockInstruments: new Set([NetraInstruments.HTTP])});