Skip to content

Commit 046a710

Browse files
committed
Merge remote-tracking branch 'origin/main' into hybim-717
# Conflicts: # src/galileo/__future__/metric.py # src/galileo/__init__.py # src/galileo/exceptions.py # src/galileo/handlers/agent_control/__init__.py # src/galileo/handlers/langchain/__init__.py # src/galileo/handlers/openai_agents/__init__.py # src/splunk_ao/__future__/__init__.py # src/splunk_ao/agent_control.py # src/splunk_ao/configuration.py # src/splunk_ao/datasets.py # src/splunk_ao/decorator.py # src/splunk_ao/experiment.py # src/splunk_ao/experiment_tags.py # src/splunk_ao/experiments.py # src/splunk_ao/export.py # src/splunk_ao/handlers/agent_control/bridge.py # src/splunk_ao/handlers/base_async_handler.py # src/splunk_ao/handlers/base_handler.py # src/splunk_ao/handlers/crewai/handler.py # src/splunk_ao/handlers/langchain/async_handler.py # src/splunk_ao/handlers/langchain/handler.py # src/splunk_ao/handlers/langchain/middleware.py # src/splunk_ao/handlers/openai_agents/handler.py # src/splunk_ao/integration.py # src/splunk_ao/job_progress.py # src/splunk_ao/jobs.py # src/splunk_ao/log_stream.py # src/splunk_ao/log_streams.py # src/splunk_ao/logger/__init__.py # src/splunk_ao/logger/logger.py # src/splunk_ao/metric.py # src/splunk_ao/metrics.py # src/splunk_ao/middleware/tracing.py # src/splunk_ao/openai/__init__.py # src/splunk_ao/openai/extractors.py # src/splunk_ao/openai/response_generator.py # src/splunk_ao/otel.py # src/splunk_ao/project.py # src/splunk_ao/projects.py # src/splunk_ao/prompt.py # src/splunk_ao/prompts.py # src/splunk_ao/protect.py # src/splunk_ao/provider.py # src/splunk_ao/runs.py # src/splunk_ao/scorers.py # src/splunk_ao/search.py # src/splunk_ao/stages.py # src/splunk_ao/traces.py # src/splunk_ao/types.py # src/splunk_ao/utils/datasets.py # src/splunk_ao/utils/env_helpers.py # src/splunk_ao/utils/metrics.py # src/splunk_ao/utils/singleton.py # tests/conftest.py # tests/schemas/test_metrics.py # tests/test_agent_control.py # tests/test_agent_control_bridge.py # tests/test_async_base_handler.py # tests/test_backward_compat_future.py # tests/test_base_handler.py # tests/test_config.py # tests/test_configuration.py # tests/test_crewai_handler.py # tests/test_deprecations.py # tests/test_experiment.py # tests/test_experiments.py # tests/test_integration.py # tests/test_langchain.py # tests/test_langchain_async.py # tests/test_langchain_middleware.py # tests/test_log_stream.py # tests/test_log_streams_metrics.py # tests/test_log_streams_pagination.py # tests/test_logger_batch.py # tests/test_logger_distributed.py # tests/test_logger_timestamps.py # tests/test_metric.py # tests/test_metric_types.py # tests/test_middleware_tracing.py # tests/test_openai.py # tests/test_openai_agents.py # tests/test_openai_agents_utils.py # tests/test_otel.py # tests/test_project.py # tests/test_prompt.py # tests/test_traces_client_headers.py # tests/testutils/setup.py
2 parents 1f14147 + 70ea0d3 commit 046a710

104 files changed

Lines changed: 1025 additions & 1015 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/langgraph/basic_langgraph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from langgraph.graph.message import add_messages
1818
from typing_extensions import TypedDict
1919

20-
from splunk_ao.handlers.langchain import GalileoCallback
20+
from splunk_ao.handlers.langchain import SplunkAOCallback
2121

2222

2323
class State(TypedDict):
@@ -45,4 +45,4 @@ def node2(state: State) -> dict:
4545
graph = graph_builder.compile()
4646

4747
graph.get_graph().print_ascii()
48-
graph.invoke({"messages": [{"role": "user", "content": "hi!"}]}, config={"callbacks": [GalileoCallback()]})
48+
graph.invoke({"messages": [{"role": "user", "content": "hi!"}]}, config={"callbacks": [SplunkAOCallback()]})

examples/langgraph/with_openai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from langgraph.graph.message import add_messages
1616
from typing_extensions import TypedDict
1717

18-
from splunk_ao.handlers.langchain import GalileoCallback
18+
from splunk_ao.handlers.langchain import SplunkAOCallback
1919

2020

2121
class State(TypedDict):
@@ -42,4 +42,4 @@ def chatbot(state: State) -> dict:
4242

4343
graph.get_graph().print_ascii()
4444

45-
graph.invoke({"messages": [{"role": "user", "content": "hi!"}]}, {"callbacks": [GalileoCallback()]})
45+
graph.invoke({"messages": [{"role": "user", "content": "hi!"}]}, {"callbacks": [SplunkAOCallback()]})

galileo-a2a/examples/two_agent_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from langgraph.graph import END, START, StateGraph
4949
from opentelemetry.instrumentation.langchain import LangchainInstrumentor
5050
from opentelemetry.sdk.trace import TracerProvider
51-
from splunk_ao.otel import GalileoSpanProcessor, add_galileo_span_processor
51+
from splunk_ao.otel import SplunkAOSpanProcessor, add_galileo_span_processor
5252
from starlette.applications import Starlette
5353
from typing_extensions import TypedDict
5454

@@ -61,7 +61,7 @@
6161
# ---------------------------------------------------------------------------
6262

6363
provider = TracerProvider()
64-
add_galileo_span_processor(provider, GalileoSpanProcessor())
64+
add_galileo_span_processor(provider, SplunkAOSpanProcessor())
6565
A2AInstrumentor().instrument(tracer_provider=provider, agent_name="orchestrator")
6666
LangchainInstrumentor().instrument(tracer_provider=provider)
6767

galileo-a2a/src/galileo_a2a/instrumentor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ class A2AInstrumentor(BaseInstrumentor): # type: ignore[misc]
3232
Example::
3333
3434
from opentelemetry.sdk.trace import TracerProvider
35-
from splunk_ao.otel import GalileoSpanProcessor, add_galileo_span_processor
35+
from splunk_ao.otel import SplunkAOSpanProcessor, add_galileo_span_processor
3636
from galileo_a2a import A2AInstrumentor
3737
3838
provider = TracerProvider()
39-
add_galileo_span_processor(provider, GalileoSpanProcessor())
39+
add_galileo_span_processor(provider, SplunkAOSpanProcessor())
4040
A2AInstrumentor().instrument(tracer_provider=provider, agent_name="my-agent")
4141
4242
# To disable message content capture (e.g. for PII compliance):

galileo-adk/src/galileo_adk/observer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from uuid import UUID
1212

1313
from splunk_ao import galileo_context
14-
from splunk_ao.handlers.base_handler import GalileoBaseHandler
14+
from splunk_ao.handlers.base_handler import SplunkAOBaseHandler
1515
from splunk_ao.schema.trace import TracesIngestRequest
1616
from splunk_ao.utils.serialization import serialize_to_str
1717

@@ -148,7 +148,7 @@ def __init__(
148148
if ingestion_hook:
149149
trace_builder = TraceBuilder(ingestion_hook=ingestion_hook)
150150
self._trace_builder = trace_builder
151-
self._handler = GalileoBaseHandler(
151+
self._handler = SplunkAOBaseHandler(
152152
galileo_logger=trace_builder, # type: ignore[arg-type]
153153
start_new_trace=True,
154154
flush_on_chain_end=True,
@@ -157,7 +157,7 @@ def __init__(
157157
else:
158158
self._trace_builder = None
159159
galileo_logger = galileo_context.get_logger_instance(project=project, log_stream=log_stream)
160-
self._handler = GalileoBaseHandler(
160+
self._handler = SplunkAOBaseHandler(
161161
galileo_logger=galileo_logger,
162162
start_new_trace=True,
163163
flush_on_chain_end=True,
@@ -171,7 +171,7 @@ def __init__(
171171
self._session_root_invocation: dict[str, str] = {}
172172

173173
@property
174-
def handler(self) -> GalileoBaseHandler:
174+
def handler(self) -> SplunkAOBaseHandler:
175175
"""Access the underlying handler."""
176176
return self._handler
177177

galileo-adk/src/galileo_adk/span_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Any
88
from uuid import UUID
99

10-
from splunk_ao.handlers.base_handler import GalileoBaseHandler
10+
from splunk_ao.handlers.base_handler import SplunkAOBaseHandler
1111

1212
from galileo_adk.types import RunContext
1313

@@ -18,7 +18,7 @@
1818
class SpanManager:
1919
"""Manages span creation and hierarchy for Galileo observability."""
2020

21-
def __init__(self, handler: GalileoBaseHandler) -> None:
21+
def __init__(self, handler: SplunkAOBaseHandler) -> None:
2222
self._handler = handler
2323
self._run_contexts: dict[str, RunContext] = {}
2424

galileo-adk/src/galileo_adk/trace_builder.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Lightweight trace builder for ingestion hook mode.
22
33
This module provides a TraceBuilder class that implements the same interface as
4-
GalileoLogger for trace building, but without requiring Galileo credentials or
4+
SplunkAOLogger for trace building, but without requiring Galileo credentials or
55
backend connectivity.
66
77
When using `ingestion_hook`, the plugin can build traces locally and pass them
@@ -46,10 +46,10 @@ def _handle_async_hook_result(task: asyncio.Task) -> None:
4646
class TraceBuilder(TracesLogger):
4747
"""Lightweight trace builder for ingestion hook mode.
4848
49-
Inherits trace-building logic from TracesLogger (same base as GalileoLogger).
49+
Inherits trace-building logic from TracesLogger (same base as SplunkAOLogger).
5050
No Galileo credentials or backend connection required.
5151
52-
This class provides the same interface as GalileoLogger for:
52+
This class provides the same interface as SplunkAOLogger for:
5353
- Starting traces and adding spans (llm, tool, workflow, agent, retriever)
5454
- Managing parent span hierarchy
5555
- Flushing traces (calls ingestion_hook instead of API)
@@ -150,8 +150,8 @@ def start_trace(
150150
) -> LoggedTrace:
151151
"""Create a new trace and add it to the list of traces.
152152
153-
This method mirrors GalileoLogger.start_trace() for API compatibility
154-
with GalileoBaseHandler.
153+
This method mirrors SplunkAOLogger.start_trace() for API compatibility
154+
with SplunkAOBaseHandler.
155155
156156
Parameters
157157
----------
@@ -228,7 +228,7 @@ def add_workflow_span(
228228
"""Add a workflow span to the current parent.
229229
230230
This method wraps TracesLogger.add_workflow_span() to accept
231-
`metadata` parameter (for GalileoBaseHandler compatibility).
231+
`metadata` parameter (for SplunkAOBaseHandler compatibility).
232232
"""
233233
parent = self.current_parent()
234234
span = LoggedWorkflowSpan(
@@ -269,7 +269,7 @@ def add_agent_span(
269269
"""Add an agent span to the current parent.
270270
271271
This method wraps TracesLogger.add_agent_span() to accept
272-
`metadata` parameter (for GalileoBaseHandler compatibility).
272+
`metadata` parameter (for SplunkAOBaseHandler compatibility).
273273
"""
274274
parent = self.current_parent()
275275
span = LoggedAgentSpan(
@@ -318,7 +318,7 @@ def add_llm_span(
318318
"""Add an LLM span to the current parent.
319319
320320
This method wraps TracesLogger.add_llm_span() to accept
321-
`metadata` parameter (for GalileoBaseHandler compatibility).
321+
`metadata` parameter (for SplunkAOBaseHandler compatibility).
322322
"""
323323
span = LoggedLlmSpan(
324324
input=input,
@@ -365,7 +365,7 @@ def add_tool_span(
365365
"""Add a tool span to the current parent.
366366
367367
This method wraps TracesLogger.add_tool_span() to accept
368-
`metadata` parameter (for GalileoBaseHandler compatibility).
368+
`metadata` parameter (for SplunkAOBaseHandler compatibility).
369369
"""
370370
return super().add_tool_span(
371371
id=uuid.uuid4(),
@@ -400,7 +400,7 @@ def add_retriever_span(
400400
"""Add a retriever span to the current parent.
401401
402402
This method wraps TracesLogger.add_retriever_span() to accept
403-
`metadata` parameter (for GalileoBaseHandler compatibility).
403+
`metadata` parameter (for SplunkAOBaseHandler compatibility).
404404
"""
405405
documents = convert_to_documents(output, "output")
406406
redacted_documents = convert_to_documents(redacted_output, "redacted_output")

galileo-adk/tests/conftest.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from galileo_core.constants.routes import Routes as CoreRoutes
99
from galileo_core.schemas.core.user import User
1010
from galileo_core.schemas.core.user_role import UserRole
11+
from splunk_ao.config import SplunkAOConfig
12+
from splunk_ao.utils.singleton import SplunkAOLoggerSingleton
1113
from test_support.config import fast_config_validation
12-
from splunk_ao.config import GalileoPythonConfig
13-
from splunk_ao.utils.singleton import GalileoLoggerSingleton
1414

1515
# Note: The mock_request fixture is automatically provided by galileo_core[testing] extras
1616

@@ -123,7 +123,7 @@ def mock_log_streams(mock_request: Callable) -> Generator[None, None, None]:
123123

124124
@pytest.fixture
125125
def mock_sessions(mock_request: Callable) -> Generator[None, None, None]:
126-
"""Mock the sessions endpoints used by GalileoLogger.start_session().
126+
"""Mock the sessions endpoints used by SplunkAOLogger.start_session().
127127
128128
Endpoints:
129129
- POST /projects/{project_id}/sessions/search - search sessions
@@ -163,17 +163,17 @@ def set_validated_config(
163163
) -> Generator[None, None, None]:
164164
"""Automatically set up validated config for tests."""
165165
# Reset any existing config state
166-
if GalileoPythonConfig._instance is not None:
167-
GalileoPythonConfig._instance.reset()
166+
if SplunkAOConfig._instance is not None:
167+
SplunkAOConfig._instance.reset()
168168
# Reset any cached loggers from previous tests
169-
GalileoLoggerSingleton().reset_all()
169+
SplunkAOLoggerSingleton().reset_all()
170170

171171
# Bypass the slow async validation round-trips for the build only; the
172172
# endpoints are already mocked above, so this only removes event-loop cost
173173
# (notably the ~11x slower Windows IOCP poll on Python 3.11+).
174174
with fast_config_validation():
175-
config = GalileoPythonConfig.get(console_url="http://fake.test:8088", api_key="api-1234567890")
175+
config = SplunkAOConfig.get(console_url="http://fake.test:8088", api_key="api-1234567890")
176176
yield
177177
# Clean up after test
178-
GalileoLoggerSingleton().reset_all()
178+
SplunkAOLoggerSingleton().reset_all()
179179
config.reset()

galileo-adk/tests/test_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_init_with_ingestion_hook_without_env_vars(self, monkeypatch: pytest.Mon
4040
traces: list = []
4141
plugin = GalileoADKPlugin(ingestion_hook=lambda r: traces.extend(r.traces))
4242

43-
# Then: plugin initializes successfully with TraceBuilder (not GalileoLogger)
43+
# Then: plugin initializes successfully with TraceBuilder (not SplunkAOLogger)
4444
assert plugin._observer is not None
4545
assert plugin._observer._trace_builder is not None
4646
assert plugin._observer._trace_builder._ingestion_hook is not None

galileo-adk/tests/test_trace_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ def test_add_retriever_span(self, builder_with_trace: TraceBuilder) -> None:
176176
# When: adding a retriever span
177177
span = builder.add_retriever_span(
178178
input="search query",
179-
output=[], # TraceBuilder uses 'output' (same as GalileoLogger API)
179+
output=[], # TraceBuilder uses 'output' (same as SplunkAOLogger API)
180180
)
181181

182182
# Then: span is created
183183
assert span is not None
184184

185185
def test_add_retriever_span_with_string_output(self, builder_with_trace: TraceBuilder) -> None:
186186
# Given: a trace builder with an active trace and string output
187-
# (this is what GalileoBaseHandler passes after serialize_to_str)
187+
# (this is what SplunkAOBaseHandler passes after serialize_to_str)
188188
builder = builder_with_trace
189189

190190
# When: adding a retriever span with a string output

0 commit comments

Comments
 (0)