wisecubeai / pythia

Open source AI hallucination monitoring
https://askpythia.ai/
Apache License 2.0
4 stars 0 forks source link

Configure Pythia to select LLM traces only from Jaeger #4

Open cloudronin opened 1 month ago

cloudronin commented 1 month ago

Right there is no way in Pythia to have it process only 'select' traces in Jaeger. In a production Jaeger environment , there will be traces that are not LLM traces and Pythia should not try and process those.

We need a configuration in Pythia that allows Pythia to be selective about the Jaeger traces it needs to process.

Maybe we can modify the client sdk to add in an attribute that makes it easier for the backend pythia docker to select the LLM traces only.

pratacosmin commented 1 month ago

Custum service Name - LLM traces from wrapper (OpenLit)

If you want to change where and from were pythia writes and reads traces you can set the JAEGER_SERVICE_NAME in the .env file and also set the service_name for the Pythia traces to your value. The default value is default.

JAEGER_SERVICE_NAME=default

## Pythia Trace Collector with custom service name
traces = PythiaTraces(endpoint="http://localhost:4318", service_name="default")
traces.init