Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/fortifyroot/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ def init(

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
)

With specific instruments::
Expand All @@ -614,15 +614,15 @@ def init(

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
instruments={Instruments.OPENAI, Instruments.LANGCHAIN},
)

Disable content tracing for privacy::

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
trace_content=False,
)

Expand All @@ -632,7 +632,7 @@ def init(

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
sampler=TraceIdRatioBased(0.1), # Sample 10% of traces
)

Expand All @@ -644,7 +644,7 @@ def init(

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
processors=[console_processor],
)

Expand All @@ -656,7 +656,7 @@ def span_callback(span):

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
span_postprocess_callback=span_callback,
)
"""
Expand Down Expand Up @@ -929,7 +929,7 @@ def set_association_properties(properties: Dict) -> None:

import fortifyroot.ocelle as ocelle

ocelle.init(app_name="my-app", api_key="fr-xxx")
ocelle.init(app_name="my-app", api_key="fr_sk_...")

# Set properties that will be attached to all subsequent spans
ocelle.set_association_properties({
Expand Down Expand Up @@ -964,15 +964,15 @@ class FortifyRootConfig:
# Fluent API
ocelle.configure() \\
.app_name("my-llm-app") \\
.api_key("fr-xxx") \\
.api_key("fr_sk_...") \\
.trace_content(False) \\
.sampler(TraceIdRatioBased(0.1)) \\
.init()

# Equivalent to:
ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
trace_content=False,
sampler=TraceIdRatioBased(0.1),
)
Expand Down Expand Up @@ -1154,7 +1154,7 @@ def configure() -> FortifyRootConfig:

ocelle.configure() \\
.app_name("my-app") \\
.api_key("fr-xxx") \\
.api_key("fr_sk_...") \\
.trace_content(False) \\
.init()

Expand Down
4 changes: 2 additions & 2 deletions src/fortifyroot/instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
# Only instrument OpenAI and LangChain
ocelle.init(
app_name="my-app",
api_key="fr-xxx",
api_key="fr_sk_...",
instruments={Instruments.OPENAI, Instruments.LANGCHAIN},
)

# Instrument everything except Bedrock
ocelle.init(
app_name="my-app",
api_key="fr-xxx",
api_key="fr_sk_...",
block_instruments={Instruments.BEDROCK},
)
"""
Expand Down
Loading