Skip to content
Open
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
3 changes: 0 additions & 3 deletions examples/chatbot/basic-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ logger.add_llm_span(

# Conclude the trace
logger.conclude(output=response.choices[0].message.content.strip())

# Flush the traces to Splunk AO
logger.flush()
```

This approach gives you more control over what gets logged and when, allowing you to:
Expand Down
3 changes: 0 additions & 3 deletions examples/chatbot/basic-examples/hallucination.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,3 @@ def run_hallucination_demo():

# Run the main demonstration
results = run_hallucination_demo()

# Flush the traces to Splunk AO
logger.flush()
3 changes: 0 additions & 3 deletions examples/chatbot/basic-examples/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,5 @@
# Conclude the trace
logger.conclude(output=response_content)

# Flush the traces to Splunk AO
logger.flush()

# Print the response
print(response_content)
3 changes: 0 additions & 3 deletions examples/logging-samples/splunk-ao-logger/basic-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
# Conclude the trace with the final output
logger.conclude(output="Hello, this is a test", duration_ns=1000)

# Flush the trace to Splunk AO
logger.flush()


# Show link to Splunk AO log stream
config = SplunkAOConfig.get()
Expand Down
3 changes: 0 additions & 3 deletions examples/logging-samples/splunk-ao-logger/metadata-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
# Conclude the trace with the final output
logger.conclude(output_answer)

# Flush the trace to Splunk AO
logger.flush()

# Show link to Splunk AO log stream
config = SplunkAOConfig.get()
project_url = f"{config.console_url}project/{logger.project_id}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
redacted_input = user_input.replace(sensitive_info, "***")
trace = logger.start_trace(input=user_input, redacted_input=redacted_input)

logger.flush() # send the trace to Splunk AO

# Example of how to create "redacted_input", matching email as sensitive info
# ---------------------------------------------------------------------------

Expand All @@ -37,8 +35,6 @@
else:
trace = logger.start_trace(input=user_input)

logger.flush() # send the trace to Splunk AO

# It's also possible to use a service such as https://www.private-ai.com/ to create the redacted_input

# Export the logged traces in the logstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@

logger.conclude(output="This is another trace conclude", duration_ns=1000)

# Flush the traces to splunk_ao
logger.flush()


# Show link to Splunk AO log stream
config = SplunkAOConfig.get()
Expand Down
2 changes: 0 additions & 2 deletions splunk-ao-migration-tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ logger = GalileoLogger(project="my-project", log_stream="production")
logger.start_session(name="my-session")
logger.add_llm_span(input="Hello", output="Hi", model="gpt-4")
logger.conclude() # closes current span; no flush kwarg
logger.flush() # uploads traces
```

### After (splunk-ao)
Expand All @@ -418,7 +417,6 @@ logger = SplunkAOLogger(project="my-project", agent_stream="production")
logger.start_session(name="my-session")
logger.add_llm_span(input="Hello", output="Hi", model="gpt-4")
logger.conclude() # closes current span; no flush kwarg
logger.flush() # uploads traces
```

---
Expand Down
1 change: 0 additions & 1 deletion splunk-ao-migration-tool/examples/after_splunk_ao.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ def call_llm(prompt: str) -> str:
logger.start_session(name="my-session")
logger.add_llm_span(input="Hello", output="Hi", model="gpt-4")
logger.conclude() # closes current span; no flush kwarg
logger.flush() # uploads traces
1 change: 0 additions & 1 deletion splunk-ao-migration-tool/examples/before_galileo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ def call_llm(prompt: str) -> str:
logger.start_session(name="my-session")
logger.add_llm_span(input="Hello", output="Hi", model="gpt-4")
logger.conclude() # closes current span; no flush kwarg
logger.flush() # uploads traces
1 change: 0 additions & 1 deletion src/splunk_ao/logger/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ class SplunkAOLogger(TracesLogger):
duration_ns=1000
)
logger.conclude(output="I am!", duration_ns=2000)
logger.flush()
```
"""

Expand Down
Loading