Skip to content

Commit

Permalink
chng name
Browse files Browse the repository at this point in the history
  • Loading branch information
alizenhom committed Jun 13, 2024
1 parent ed8aa99 commit 9f16e04
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/examples/langchain_example/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

langtrace.init(
write_spans_to_console=False,
disable_tracing_for_methods={"langchain": ["RunnableSequence.invoke"]},
disable_tracing_for_functions={"langchain": ["RunnableSequence.invoke"]},
)


Expand Down
2 changes: 1 addition & 1 deletion src/examples/llamaindex_example/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


langtrace.init(
disable_tracing_for_methods={
disable_tracing_for_functions={
"open_ai": ["openai.chat.completions.create"],
}
)
Expand Down
4 changes: 2 additions & 2 deletions src/langtrace_python_sdk/langtrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ def init(
custom_remote_exporter=None,
api_host: Optional[str] = LANGTRACE_REMOTE_URL,
disable_instrumentations: Optional[DisableInstrumentations] = None,
disable_tracing_for_methods: Optional[InstrumentationMethods] = None,
disable_tracing_for_functions: Optional[InstrumentationMethods] = None,
):

host = (
os.environ.get("LANGTRACE_API_HOST", None) or api_host or LANGTRACE_REMOTE_URL
)
check_if_sdk_is_outdated()
print(Fore.GREEN + "Initializing Langtrace SDK.." + Fore.RESET)
sampler = LangtraceSampler(disabled_methods=disable_tracing_for_methods)
sampler = LangtraceSampler(disabled_methods=disable_tracing_for_functions)
provider = TracerProvider(
resource=Resource.create({"service.name": sys.argv[0]}),
sampler=sampler,
Expand Down

0 comments on commit 9f16e04

Please sign in to comment.