tracecast 0.2.8__tar.gz → 0.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tracecast-0.2.8/tracecast.egg-info → tracecast-0.2.9}/PKG-INFO +1 -1
- {tracecast-0.2.8 → tracecast-0.2.9}/pyproject.toml +1 -1
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/openai_inst.py +17 -1
- {tracecast-0.2.8 → tracecast-0.2.9/tracecast.egg-info}/PKG-INFO +1 -1
- {tracecast-0.2.8 → tracecast-0.2.9}/LICENSE +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/README.md +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/setup.cfg +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_aggregator_graph.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_context_propagation.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_cost_calculator.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_dashboard_mount.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_dashboard_pushdown.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_dashboard_sessions.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_decorators.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_e2e_langgraph.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_exporters_db.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_integration_frameworks.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_integration_langchain.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_json_exporter.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_langchain_callback.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_llm_wrappers.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_logging.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_mongo_exporter.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_prompt_dashboard.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_prompts.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_roundtrip.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_schema_v2.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_score.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_score_dashboard.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_scoring_api.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_serve.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_span.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_streaming.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_token_counter.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_trace.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_trace_span.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tests/test_tracer.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/core/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/core/cost_calculator.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/core/logger.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/core/scoring.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/core/token_counter.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/core/tracer.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/aggregator.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/asgi_middleware.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/blueprint.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/eval_reader.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/prompt_reader.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/reader.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/router.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/score_reader.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/standalone.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/static/assets/index-B07hiBI2.js +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/static/assets/index-BMIlEmLS.js +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/static/assets/index-CY5YOA8F.js +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/static/assets/index-DllJJzmE.css +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/static/assets/index-Dt0awpJJ.js +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/dashboard/static/index.html +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/decorators.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/cli.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/compare.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/dataset.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/decorator.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/judge.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/metrics.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/models.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/online.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/runner.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/eval/scorers.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/_eval_store.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/base.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/dict_exporter.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/json_file.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/mongo.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/postgres.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/exporters/query.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrument.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/_llamaindex_handler.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/_streaming.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/anthropic_inst.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/base.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/crewai_inst.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/gemini_inst.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/langchain_inst.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/instrumentors/llamaindex_inst.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/integrations/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/integrations/langchain.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/integrations/llm.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/middleware.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/models/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/models/score.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/models/span.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/models/trace.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/prompts/__init__.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/prompts/client.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/prompts/models.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast/serve.py +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast.egg-info/SOURCES.txt +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast.egg-info/dependency_links.txt +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast.egg-info/entry_points.txt +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast.egg-info/requires.txt +0 -0
- {tracecast-0.2.8 → tracecast-0.2.9}/tracecast.egg-info/top_level.txt +0 -0
|
@@ -5,6 +5,22 @@ from typing import Any, Optional
|
|
|
5
5
|
from .base import BaseInstrumentor, active_parent_id
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
# Only LangChain's own LLM-wrapper packages directly invoke the underlying
|
|
9
|
+
# provider client on their own behalf, triggering LangChain's callback system
|
|
10
|
+
# (which TraceCastCallback hooks into via LangChainInstrumentor). Orchestration
|
|
11
|
+
# packages (langchain_core.tools, langchain.agents, langgraph.*) run *above*
|
|
12
|
+
# a raw client call made by application code (e.g. a @tool function) — that
|
|
13
|
+
# call is invisible to LangChain's callbacks, so it must NOT be deferred here,
|
|
14
|
+
# or it silently disappears from tracing entirely.
|
|
15
|
+
_LANGCHAIN_LLM_WRAPPER_PREFIXES = (
|
|
16
|
+
"langchain_openai.",
|
|
17
|
+
"langchain_community.chat_models",
|
|
18
|
+
"langchain_community.llms",
|
|
19
|
+
"langchain.chat_models",
|
|
20
|
+
"langchain.llms",
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
8
24
|
def _handled_by_langchain() -> bool:
|
|
9
25
|
from ..instrument import _registry
|
|
10
26
|
|
|
@@ -15,7 +31,7 @@ def _handled_by_langchain() -> bool:
|
|
|
15
31
|
depth = 0
|
|
16
32
|
while frame is not None and depth < 60:
|
|
17
33
|
module = frame.f_globals.get("__name__", "")
|
|
18
|
-
if module.startswith(
|
|
34
|
+
if module.startswith(_LANGCHAIN_LLM_WRAPPER_PREFIXES):
|
|
19
35
|
return True
|
|
20
36
|
frame = frame.f_back
|
|
21
37
|
depth += 1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|