Skip to content
Merged
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
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ pip install "fortifyroot-ocelle[openai,anthropic,langchain]"
import fortifyroot.ocelle as ocelle

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
app_name="my-llm-app", # any name you choose for this service
api_key="fr_sk_...",
resource_attributes={"environment": "dev"}, # dev / prod / testing — or any label you choose
)

import openai
Expand Down Expand Up @@ -89,7 +90,7 @@ from fortifyroot.ocelle import Instruments

ocelle.init(
app_name="my-llm-app",
api_key="fr-xxx",
api_key="fr_sk_...",
api_endpoint="https://api.fortifyroot.com",
trace_content=True,
instruments={Instruments.OPENAI, Instruments.LANGCHAIN},
Expand All @@ -104,7 +105,7 @@ from opentelemetry.sdk.trace.sampling import TraceIdRatioBased

ocelle.configure() \
.app_name("my-llm-app") \
.api_key("fr-xxx") \
.api_key("fr_sk_...") \
.trace_content(False) \
.sampler(TraceIdRatioBased(0.1)) \
.init()
Expand All @@ -119,7 +120,7 @@ from opentelemetry.sdk.trace.sampling import TraceIdRatioBased

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

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

ocelle.init(
app_name="my-app",
api_key="fr-xxx",
api_key="fr_sk_...",
span_postprocess_callback=span_callback,
)
```
Expand Down Expand Up @@ -172,7 +173,7 @@ Attach custom properties to traces for filtering and correlation:
```python
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_...")

ocelle.set_association_properties({
"user_id": "user_12345",
Expand All @@ -196,7 +197,7 @@ import fortifyroot.ocelle as ocelle

ocelle.init(
app_name="my-app",
api_key="fr-xxx",
api_key="fr_sk_...",
trace_content=False,
)
```
Expand Down
Loading