Skip to content

[FEAT] Abstract tracing hooks to support alternative monitoring providers #596

Description

@suhaniiz

Is your feature request related to a problem? Please describe.

Yes. The tracking utilities are coupled exclusively to LangSmith. If an enterprise user wants to self-host an alternative open-source OpenTelemetry alternative (such as Phoenix by Arize, Phoenix-OpenInference, Langfuse, or TruLens) for privacy compliance, they have to rewrite or bypass this module entirely.

Describe the solution you'd like

Abstract our tracing signatures so that the RAG pipeline targets a generalized observation abstraction layer:

Introduce an interface or strategy coordinator that selects a tracing backend provider depending on configured environment toggles (e.g., TRACING_PROVIDER="langsmith" | "langfuse" | "none").

Move LangSmith specific environment setup out of the main module space and place it into an implementation sub-module.

Describe alternatives you've considered

Direct implementation layering: Keeping it inline and introducing if settings.LANGFUSE_ENABLED: structures inside trace_call. This is rejected because it turns our foundational decorator framework into a tangled mess of conditional logic handling completely different SDK exceptions.

Additional Context

Decoupling telemetry early safeguards the application against vendor lock-in and allows development teams to run cheap open-source observability suites locally while opting for enterprise monitoring platforms in production.

GSSoC '26

  • Yes, I am participating in GirlScript Summer of Code and would like to build this.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvementgssocGirlScript Summer of Code 2026 issue/PR

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions