Traceloop

If you are using python, javascript or other Traceloop compatible language, you can submit LLM traces to Darkraven with Traceloop SDK.

Full compatibility reference: - Traceloop Doc - OpenLLMetry

- Traceloop Doc - What's support ?

Install Traceloop

pip install traceloop-sdk

Initialization

from opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from traceloop.sdk import Traceloop


app_name="LLM app name"
trace_endpoint="https://api.darkraven.com/api/v1/insert/trace-otlp"
metric_endpoint="https://api.darkraven.com/api/v1/insert/metric-otlp"
apikey="Darkraven API Key"

traces_exporter = OTLPSpanExporter(
    endpoint=trace_endpoint,
    headers={"apikey":apikey}
)
    
metrics_exporter = OTLPMetricExporter(
    endpoint_metric_endpoint,
    headers={"apikey":apikey}
)

Traceloop.init(
    app_name=app_name,
    exporter=traces_exporter,
    metrics_exporter=metrics_exporter
)

Other

To use other functionality of Langsmith, refer to: Traceloop Doc - Workflow Annotations.

Last updated