From 1dc7b8e52c0f80ac4b5e73cd2e4b77ca4def6ba5 Mon Sep 17 00:00:00 2001 From: sayonfortify Date: Mon, 22 Jun 2026 20:30:41 +0530 Subject: [PATCH] docs(sdk): fix fr_sk_ key format in core.py + instruments.py docstrings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extends the README fix to the in-code docstring examples (rendered in help()/IDE hovers), which still showed api_key="fr-xxx". Real keys are fr_sk_. First-party code only — no _vendor/ changes, so no re-vendoring needed per internal-sop VENDORING_SOP.md. - core.py: 10 occurrences (init() + configure() fluent-API examples) - instruments.py: 2 occurrences --- src/fortifyroot/core.py | 20 ++++++++++---------- src/fortifyroot/instruments.py | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/fortifyroot/core.py b/src/fortifyroot/core.py index 84ece26..b8c4e13 100644 --- a/src/fortifyroot/core.py +++ b/src/fortifyroot/core.py @@ -605,7 +605,7 @@ def init( ocelle.init( app_name="my-llm-app", - api_key="fr-xxx", + api_key="fr_sk_...", ) With specific instruments:: @@ -614,7 +614,7 @@ def init( ocelle.init( app_name="my-llm-app", - api_key="fr-xxx", + api_key="fr_sk_...", instruments={Instruments.OPENAI, Instruments.LANGCHAIN}, ) @@ -622,7 +622,7 @@ def init( ocelle.init( app_name="my-llm-app", - api_key="fr-xxx", + api_key="fr_sk_...", trace_content=False, ) @@ -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 ) @@ -644,7 +644,7 @@ def init( ocelle.init( app_name="my-llm-app", - api_key="fr-xxx", + api_key="fr_sk_...", processors=[console_processor], ) @@ -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, ) """ @@ -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({ @@ -964,7 +964,7 @@ 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() @@ -972,7 +972,7 @@ class FortifyRootConfig: # Equivalent to: ocelle.init( app_name="my-llm-app", - api_key="fr-xxx", + api_key="fr_sk_...", trace_content=False, sampler=TraceIdRatioBased(0.1), ) @@ -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() diff --git a/src/fortifyroot/instruments.py b/src/fortifyroot/instruments.py index 1724547..1254bed 100644 --- a/src/fortifyroot/instruments.py +++ b/src/fortifyroot/instruments.py @@ -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}, ) """