From 8960799895d7a9b7998b04d0c35488d144a81409 Mon Sep 17 00:00:00 2001 From: Pablo Pardo Garcia Date: Wed, 5 Aug 2026 15:27:41 +0200 Subject: [PATCH] feat!: rebrand SDK to glassflow-rius, import rius Per GLA2-322 and the 2026-08-05 naming decision: the PyPI distribution becomes glassflow-rius and the import package becomes rius (repo renamed to rius-sdk-python; GitHub redirects). DEFAULT_ENDPOINT moves to the GLA2-311 production host (ingest.eu.console.rius-glassflow.com), and telemetry.distro.name follows the dist name. Deliberately unchanged (wire/config contracts, follow-ups tracked on the ticket): GLASSFLOW_* environment variables, the glassflow tracer scope name (backend keys on it), and the glassflow.span.pending marker. BREAKING CHANGE: install glassflow-rius instead of glassflow-ai and import rius instead of glassflow. --- .github/workflows/release.yml | 4 +-- CLAUDE.md | 8 +++--- README.md | 28 +++++++++---------- pyproject.toml | 18 ++++++------ release-please-config.json | 4 +-- src/{glassflow => rius}/__init__.py | 0 src/{glassflow => rius}/_serde.py | 0 src/{glassflow => rius}/client.py | 8 +++--- src/{glassflow => rius}/config.py | 2 +- src/{glassflow => rius}/generation.py | 0 src/{glassflow => rius}/heartbeat.py | 2 +- src/{glassflow => rius}/instrumentation.py | 6 ++-- .../instrumentation_mcp.py | 2 +- src/{glassflow => rius}/masking.py | 0 src/{glassflow => rius}/observe.py | 0 src/{glassflow => rius}/pending.py | 2 +- src/{glassflow => rius}/py.typed | 0 src/{glassflow => rius}/semconv.py | 3 ++ src/{glassflow => rius}/spans.py | 0 tests/conftest.py | 6 ++-- tests/test_client.py | 10 +++---- tests/test_config.py | 2 +- tests/test_generation.py | 2 +- tests/test_heartbeat.py | 12 ++++---- tests/test_instrumentation.py | 6 ++-- tests/test_instrumentation_registry.py | 2 +- tests/test_lifecycle.py | 8 +++--- tests/test_masking.py | 2 +- tests/test_mcp_instrumentation.py | 8 +++--- tests/test_observe.py | 4 +-- tests/test_pending_delay.py | 10 +++---- tests/test_pending_spans.py | 12 ++++---- tests/test_reliability.py | 6 ++-- tests/test_semconv.py | 2 +- tests/test_serde.py | 2 +- tests/test_spans.py | 4 +-- uv.lock | 2 +- 37 files changed, 95 insertions(+), 92 deletions(-) rename src/{glassflow => rius}/__init__.py (100%) rename src/{glassflow => rius}/_serde.py (100%) rename src/{glassflow => rius}/client.py (97%) rename src/{glassflow => rius}/config.py (99%) rename src/{glassflow => rius}/generation.py (100%) rename src/{glassflow => rius}/heartbeat.py (99%) rename src/{glassflow => rius}/instrumentation.py (94%) rename src/{glassflow => rius}/instrumentation_mcp.py (98%) rename src/{glassflow => rius}/masking.py (100%) rename src/{glassflow => rius}/observe.py (100%) rename src/{glassflow => rius}/pending.py (99%) rename src/{glassflow => rius}/py.typed (100%) rename src/{glassflow => rius}/semconv.py (96%) rename src/{glassflow => rius}/spans.py (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56d8c4c..91beeca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/project/glassflow-ai/ + url: https://pypi.org/project/glassflow-rius/ permissions: id-token: write # OIDC for PyPI Trusted Publishing contents: read @@ -98,5 +98,5 @@ jobs: -e 's/\[([^]]+)\]\(([^)]+)\)/<\2|\1>/g' \ | head -c 3500) jq -n --arg tag "$TAG" --arg url "$url" --arg body "$body" \ - '{text: (":package: *glassflow-ai \($tag)* is on PyPI (<\($url)|release notes>)\n\n\($body)")}' \ + '{text: (":package: *glassflow-rius \($tag)* is on PyPI (<\($url)|release notes>)\n\n\($body)")}' \ | curl -sS --fail-with-body -X POST -H 'Content-Type: application/json' -d @- "$SLACK_WEBHOOK" diff --git a/CLAUDE.md b/CLAUDE.md index 7b2a4f1..877c9d6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# CLAUDE.md — glassflow-python +# CLAUDE.md — rius-sdk-python Conventions for the GlassFlow instrumentation SDK (Python). Follow these; they override generic defaults. @@ -10,7 +10,7 @@ emits **OpenTelemetry GenAI (`gen_ai.*`) traces over OTLP/HTTP** to the managed GlassFlow platform (or any OTLP-compatible backend). GlassFlow is **managed-only** — there is no self-host, so config targets the managed endpoint. -- Distribution name: `glassflow-ai` (PyPI) · import package: `glassflow` +- Distribution name: `glassflow-rius` (PyPI) · import package: `rius` - `src/` layout; tests in `tests/` - Python-first; the TS/JS SDK lives in a separate repository @@ -33,7 +33,7 @@ formatter/linter (no black/isort/flake8). Commit `uv.lock`. - **Python 3.10+**. Use modern typing (`X | None`, built-in generics). - **Fully typed**; ship `py.typed`. `mypy --strict` must pass (config in `pyproject.toml`). - **Ruff** for both lint and format; line length 100. -- Public API is re-exported from `glassflow/__init__.py` and listed in `__all__`. +- Public API is re-exported from `rius/__init__.py` and listed in `__all__`. - Prefer **dependency injection over mocking** for testability (e.g. `init(span_exporter=...)` instead of patching the OTLP exporter). @@ -67,7 +67,7 @@ formatter/linter (no black/isort/flake8). Commit `uv.lock`. ## Versioning & releases - **Single source of truth** for the version: `__version__` in - `src/glassflow/__init__.py` (annotated `# x-release-please-version`); + `src/rius/__init__.py` (annotated `# x-release-please-version`); hatchling reads it. **Do not** edit the version anywhere else or hand-write `CHANGELOG.md`. - Releases are automated by **release-please** + **PyPI Trusted Publishing** diff --git a/README.md b/README.md index 68e0c08..eabf8df 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # GlassFlow Python SDK -OpenTelemetry-native tracing for AI agents and LLM applications. `glassflow-ai` +OpenTelemetry-native tracing for AI agents and LLM applications. `glassflow-rius` emits [OpenTelemetry GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/) traces over OTLP to the managed GlassFlow observability platform (or any OTLP-compatible backend). @@ -10,17 +10,17 @@ OTLP-compatible backend). ## Install ```bash -pip install glassflow-ai +pip install glassflow-rius ``` ## Quickstart ```python -import glassflow -from glassflow import observe, start_as_current_generation, start_as_current_span -from glassflow.semconv import SpanKind +import rius +from rius import observe, start_as_current_generation, start_as_current_span +from rius.semconv import SpanKind -glassflow.init( +rius.init( api_key="glassflow_...", # or set GLASSFLOW_API_KEY service_name="my-agent", # or set GLASSFLOW_SERVICE_NAME ) @@ -61,9 +61,9 @@ bundled third-party instrumentation. A mask that accepts a `key` keyword also receives the attribute key, for per-attribute decisions. ```python -glassflow.init(mask=lambda value: "[REDACTED]") # redact all captured content -glassflow.init(mask=lambda value, *, key: hash_pii(value) if "input" in key else value) -glassflow.init(capture_content=False) # drop content entirely, keep metadata +rius.init(mask=lambda value: "[REDACTED]") # redact all captured content +rius.init(mask=lambda value, *, key: hash_pii(value) if "input" in key else value) +rius.init(capture_content=False) # drop content entirely, keep metadata ``` ## Auto-instrumentation @@ -74,14 +74,14 @@ extras you need and `init()` enables whatever it finds; the instrumentation spans nest under your `@observe` / `start_as_current_span` traces automatically. ```bash -pip install "glassflow-ai[openai]" # one provider -pip install "glassflow-ai[instruments]" # everything supported +pip install "glassflow-rius[openai]" # one provider +pip install "glassflow-rius[instruments]" # everything supported ``` ```python -glassflow.init() # auto-enables installed instrumentors -glassflow.init(instruments=["openai"]) # restrict to specific ones -glassflow.init(instruments=[]) # disable auto-instrumentation +rius.init() # auto-enables installed instrumentors +rius.init(instruments=["openai"]) # restrict to specific ones +rius.init(instruments=[]) # disable auto-instrumentation ``` Supported instruments: `openai`, `anthropic`, `langchain`, `llama-index`, diff --git a/pyproject.toml b/pyproject.toml index 96c6da9..8698759 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] -name = "glassflow-ai" +name = "glassflow-rius" dynamic = ["version"] -description = "GlassFlow SDK — OpenTelemetry-native tracing for AI agents and LLM applications." +description = "GlassFlow Rius SDK — OpenTelemetry-native tracing for AI agents and LLM applications." readme = "README.md" requires-python = ">=3.10" license = "MIT" @@ -15,7 +15,7 @@ keywords = [ "llm", "agents", "genai", - "glassflow", + "rius", ] classifiers = [ "Development Status :: 3 - Alpha", @@ -36,7 +36,7 @@ dependencies = [ ] [project.optional-dependencies] -# Auto-instrumentation extras — one per entry in glassflow.instrumentation.REGISTRY. +# Auto-instrumentation extras — one per entry in rius.instrumentation.REGISTRY. # Floors are the versions the registry smoke test last validated against; no caps # (these packages break within 0.x either way — CI catches forward breakage). openai = ["openinference-instrumentation-openai>=0.1.52"] @@ -55,19 +55,19 @@ instruments = [ ] [project.urls] -Homepage = "https://github.com/glassflow/glassflow-python" -Repository = "https://github.com/glassflow/glassflow-python.git" -Issues = "https://github.com/glassflow/glassflow-python/issues" +Homepage = "https://github.com/glassflow/rius-sdk-python" +Repository = "https://github.com/glassflow/rius-sdk-python.git" +Issues = "https://github.com/glassflow/rius-sdk-python/issues" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.version] -path = "src/glassflow/__init__.py" +path = "src/rius/__init__.py" [tool.hatch.build.targets.wheel] -packages = ["src/glassflow"] +packages = ["src/rius"] [dependency-groups] dev = [ diff --git a/release-please-config.json b/release-please-config.json index 001ee78..9958468 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -3,10 +3,10 @@ "packages": { ".": { "release-type": "python", - "package-name": "glassflow-ai", + "package-name": "glassflow-rius", "bump-minor-pre-major": true, "include-component-in-tag": false, - "extra-files": ["src/glassflow/__init__.py"] + "extra-files": ["src/rius/__init__.py"] } } } diff --git a/src/glassflow/__init__.py b/src/rius/__init__.py similarity index 100% rename from src/glassflow/__init__.py rename to src/rius/__init__.py diff --git a/src/glassflow/_serde.py b/src/rius/_serde.py similarity index 100% rename from src/glassflow/_serde.py rename to src/rius/_serde.py diff --git a/src/glassflow/client.py b/src/rius/client.py similarity index 97% rename from src/glassflow/client.py rename to src/rius/client.py index c972383..4363f6a 100644 --- a/src/glassflow/client.py +++ b/src/rius/client.py @@ -148,7 +148,7 @@ def init( with _lock: if set_global and _current_client is not None and not _current_client._is_shutdown: logger.warning( - "glassflow.init() was already called; keeping the existing configuration " + "rius.init() was already called; keeping the existing configuration " "(the OpenTelemetry global tracer provider is write-once). Call .shutdown() " "on the existing client first if you need to reconfigure." ) @@ -214,7 +214,7 @@ def _do_init( resource = Resource.create( { "service.name": config.service_name, - "telemetry.distro.name": "glassflow-ai", + "telemetry.distro.name": "glassflow-rius", "telemetry.distro.version": __version__, } ) @@ -240,9 +240,9 @@ def _do_init( trace.set_tracer_provider(provider) if trace.get_tracer_provider() is not provider: logger.warning( - "could not register the glassflow tracer provider as the OpenTelemetry " + "could not register the rius tracer provider as the OpenTelemetry " "global (another provider is already set); spans from @observe and " - "glassflow.get_tracer() will keep using the pre-existing provider. Use " + "rius.get_tracer() will keep using the pre-existing provider. Use " "the returned client's get_tracer() for scoped tracing." ) diff --git a/src/glassflow/config.py b/src/rius/config.py similarity index 99% rename from src/glassflow/config.py rename to src/rius/config.py index 579e7d6..1f03884 100644 --- a/src/glassflow/config.py +++ b/src/rius/config.py @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) -DEFAULT_ENDPOINT = "https://ingest.glassflow.dev" +DEFAULT_ENDPOINT = "https://ingest.eu.console.rius-glassflow.com" DEFAULT_SERVICE_NAME = "unknown_service" ENV_ENDPOINT = "GLASSFLOW_ENDPOINT" diff --git a/src/glassflow/generation.py b/src/rius/generation.py similarity index 100% rename from src/glassflow/generation.py rename to src/rius/generation.py diff --git a/src/glassflow/heartbeat.py b/src/rius/heartbeat.py similarity index 99% rename from src/glassflow/heartbeat.py rename to src/rius/heartbeat.py index a5dccc6..c77e4e7 100644 --- a/src/glassflow/heartbeat.py +++ b/src/rius/heartbeat.py @@ -185,7 +185,7 @@ def instance_id(self) -> str: def start(self) -> None: """Start the daemon thread; first ping goes out immediately.""" - self._thread = threading.Thread(target=self._run, name="glassflow-heartbeat", daemon=True) + self._thread = threading.Thread(target=self._run, name="rius-heartbeat", daemon=True) self._thread.start() atexit.register(self.stop) # A forked child must never reuse the parent's identity; the shared diff --git a/src/glassflow/instrumentation.py b/src/rius/instrumentation.py similarity index 94% rename from src/glassflow/instrumentation.py rename to src/rius/instrumentation.py index dbe8057..95b27c5 100644 --- a/src/glassflow/instrumentation.py +++ b/src/rius/instrumentation.py @@ -3,7 +3,7 @@ We reuse existing OTel instrumentors rather than rebuilding provider/framework instrumentation. The registry below maps a short name to an instrumentor class; packages are imported lazily, so nothing here adds a hard dependency. Install -via extras (``pip install glassflow-ai[openai]``) and ``init()`` enables what +via extras (``pip install glassflow-rius[openai]``) and ``init()`` enables what it finds, passing our tracer provider so instrumentation spans nest under ours. """ @@ -47,7 +47,7 @@ class InstrumentorSpec: ), InstrumentorSpec("litellm", "openinference.instrumentation.litellm", "LiteLLMInstrumentor"), # ours — first-class MCP tool-call spans (see instrumentation_mcp.py) - InstrumentorSpec("mcp", "glassflow.instrumentation_mcp", "MCPInstrumentor"), + InstrumentorSpec("mcp", "rius.instrumentation_mcp", "MCPInstrumentor"), ) @@ -82,7 +82,7 @@ def enable_instrumentations( if instruments is not None: logger.warning( "instrument %r requested but %r is not installed; " - 'install it via `pip install "glassflow-ai[%s]"`', + 'install it via `pip install "glassflow-rius[%s]"`', spec.name, spec.module, spec.name, diff --git a/src/glassflow/instrumentation_mcp.py b/src/rius/instrumentation_mcp.py similarity index 98% rename from src/glassflow/instrumentation_mcp.py rename to src/rius/instrumentation_mcp.py index d1ea280..608a6c2 100644 --- a/src/glassflow/instrumentation_mcp.py +++ b/src/rius/instrumentation_mcp.py @@ -4,7 +4,7 @@ over MCP becomes a TOOL-kind span: tool name, arguments, result, latency, and error status. Generic instrumentation SDKs cover MCP unevenly (the OpenInference MCP package only propagates context; it creates no spans), so we instrument it -ourselves. Registered in :mod:`glassflow.instrumentation` under ``"mcp"``; the +ourselves. Registered in :mod:`rius.instrumentation` under ``"mcp"``; the top-level import of ``mcp`` below makes an environment without the package look "not installed" to the registry, exactly like a missing third-party instrumentor. diff --git a/src/glassflow/masking.py b/src/rius/masking.py similarity index 100% rename from src/glassflow/masking.py rename to src/rius/masking.py diff --git a/src/glassflow/observe.py b/src/rius/observe.py similarity index 100% rename from src/glassflow/observe.py rename to src/rius/observe.py diff --git a/src/glassflow/pending.py b/src/rius/pending.py similarity index 99% rename from src/glassflow/pending.py rename to src/rius/pending.py index 37a6f1b..f1d2a5f 100644 --- a/src/glassflow/pending.py +++ b/src/rius/pending.py @@ -112,7 +112,7 @@ def __init__( def _start_thread(self) -> None: self._thread = threading.Thread( - target=self._run, name="glassflow-pending-scheduler", daemon=True + target=self._run, name="rius-pending-scheduler", daemon=True ) self._thread.start() diff --git a/src/glassflow/py.typed b/src/rius/py.typed similarity index 100% rename from src/glassflow/py.typed rename to src/rius/py.typed diff --git a/src/glassflow/semconv.py b/src/rius/semconv.py similarity index 96% rename from src/glassflow/semconv.py rename to src/rius/semconv.py index d962c9d..5344893 100644 --- a/src/glassflow/semconv.py +++ b/src/rius/semconv.py @@ -12,6 +12,9 @@ from opentelemetry.trace import Span # Instrumentation scope name (stamped on every span as otel.scope.name). +# Deliberately still "glassflow" after the Rius rebrand (GLA2-322): the value +# is wire-visible and the backend keys on it; renaming needs backend +# coordination, tracked separately. TRACER_NAME = "glassflow" # --- Attribute keys --- diff --git a/src/glassflow/spans.py b/src/rius/spans.py similarity index 100% rename from src/glassflow/spans.py rename to src/rius/spans.py diff --git a/tests/conftest.py b/tests/conftest.py index 8021eeb..a2d8f1f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -33,11 +33,11 @@ def exported_spans() -> InMemorySpanExporter: @pytest.fixture(autouse=True) -def _reset_glassflow_lifecycle() -> "Iterator[None]": +def _reset_rius_lifecycle() -> "Iterator[None]": """Clear module-level init()/instrumentation state between tests.""" yield - from glassflow import client as client_module - from glassflow import instrumentation as instrumentation_module + from rius import client as client_module + from rius import instrumentation as instrumentation_module client_module._current_client = None instrumentation_module._ENABLED.clear() diff --git a/tests/test_client.py b/tests/test_client.py index 10a8123..1de4d13 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -2,9 +2,9 @@ from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import init -from glassflow.client import GlassflowClient, build_span_exporter -from glassflow.config import resolve_config +from rius import init +from rius.client import GlassflowClient, build_span_exporter +from rius.config import resolve_config def _memory_client(**kwargs: object) -> tuple[GlassflowClient, InMemorySpanExporter]: @@ -39,7 +39,7 @@ def test_resource_has_service_name() -> None: def test_resource_uses_distro_not_sdk_identity() -> None: # Spec: telemetry.sdk.name MUST be "opentelemetry"; distributions identify # themselves via telemetry.distro.*. - from glassflow import __version__ + from rius import __version__ client, exporter = _memory_client() with client.get_tracer().start_as_current_span("op"): @@ -47,7 +47,7 @@ def test_resource_uses_distro_not_sdk_identity() -> None: client.flush() resource_attrs = exporter.get_finished_spans()[0].resource.attributes assert resource_attrs["telemetry.sdk.name"] == "opentelemetry" - assert resource_attrs["telemetry.distro.name"] == "glassflow-ai" + assert resource_attrs["telemetry.distro.name"] == "glassflow-rius" assert resource_attrs["telemetry.distro.version"] == __version__ diff --git a/tests/test_config.py b/tests/test_config.py index 3cc5d09..436021a 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,6 +1,6 @@ import pytest -from glassflow.config import DEFAULT_ENDPOINT, GlassflowConfig, resolve_config +from rius.config import DEFAULT_ENDPOINT, GlassflowConfig, resolve_config ENV_VARS = [ "GLASSFLOW_ENDPOINT", diff --git a/tests/test_generation.py b/tests/test_generation.py index 962ec40..db46132 100644 --- a/tests/test_generation.py +++ b/tests/test_generation.py @@ -3,7 +3,7 @@ from opentelemetry.sdk.trace import Event, ReadableSpan from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import start_as_current_generation, start_generation +from rius import start_as_current_generation, start_generation # --- context manager: start_as_current_generation --- diff --git a/tests/test_heartbeat.py b/tests/test_heartbeat.py index c110c24..596b489 100644 --- a/tests/test_heartbeat.py +++ b/tests/test_heartbeat.py @@ -19,9 +19,9 @@ import pytest from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import init -from glassflow.config import resolve_config -from glassflow.heartbeat import HeartbeatSender, OpenRootSpanTracker +from rius import init +from rius.config import resolve_config +from rius.heartbeat import HeartbeatSender, OpenRootSpanTracker # --------------------------------------------------------------------------- # Config surface @@ -288,7 +288,7 @@ def broken(_: dict[str, Any]) -> None: tracker=OpenRootSpanTracker(), transport=broken, ) - with caplog.at_level(logging.DEBUG, logger="glassflow.heartbeat"): + with caplog.at_level(logging.DEBUG, logger="rius.heartbeat"): sender._send_ping() # noqa: SLF001 sender._send_ping() # noqa: SLF001 warnings = [r for r in caplog.records if r.levelno == logging.WARNING] @@ -372,7 +372,7 @@ def log_message(self, *args: Any) -> None: # init() then exit normally WITHOUT calling shutdown(): the atexit # hook alone must produce the stopped ping. result = subprocess.run( - [sys.executable, "-c", "import glassflow; glassflow.init(instruments=[])"], + [sys.executable, "-c", "import rius; rius.init(instruments=[])"], env=env, timeout=30, capture_output=True, @@ -437,7 +437,7 @@ def test_final_ping_timeout_defaults_shorter_than_ping_timeout() -> None: def test_stopped_senders_leave_the_fork_registry() -> None: """init/shutdown cycles must not accumulate fork-handler references.""" - from glassflow.heartbeat import _active_senders + from rius.heartbeat import _active_senders before = len(_active_senders) sent: list[dict[str, Any]] = [] diff --git a/tests/test_instrumentation.py b/tests/test_instrumentation.py index a2cd17a..2ad93ae 100644 --- a/tests/test_instrumentation.py +++ b/tests/test_instrumentation.py @@ -14,9 +14,9 @@ import pytest from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -import glassflow.instrumentation as instrumentation -from glassflow import init -from glassflow.instrumentation import InstrumentorSpec +import rius.instrumentation as instrumentation +from rius import init +from rius.instrumentation import InstrumentorSpec class FakeInstrumentor: diff --git a/tests/test_instrumentation_registry.py b/tests/test_instrumentation_registry.py index b883c20..0a706e4 100644 --- a/tests/test_instrumentation_registry.py +++ b/tests/test_instrumentation_registry.py @@ -14,7 +14,7 @@ import pytest -from glassflow.instrumentation import REGISTRY, InstrumentorSpec +from rius.instrumentation import REGISTRY, InstrumentorSpec pytestmark = pytest.mark.skipif( not os.getenv("GLASSFLOW_ALL_EXTRAS"), diff --git a/tests/test_lifecycle.py b/tests/test_lifecycle.py index 7b70bc1..8b012e8 100644 --- a/tests/test_lifecycle.py +++ b/tests/test_lifecycle.py @@ -12,14 +12,14 @@ import pytest from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import init +from rius import init def test_second_global_init_warns_and_returns_existing_client( caplog: pytest.LogCaptureFixture, ) -> None: first = init(span_exporter=InMemorySpanExporter(), set_global=True) - with caplog.at_level("WARNING", logger="glassflow.client"): + with caplog.at_level("WARNING", logger="rius.client"): second = init(span_exporter=InMemorySpanExporter(), set_global=True, service_name="other") assert second is first assert any("already" in record.message for record in caplog.records) @@ -46,7 +46,7 @@ def test_disabled_init_does_not_claim_the_global_provider_slot( ) -> None: calls: list[object] = [] monkeypatch.setattr( - "glassflow.client.trace.set_tracer_provider", lambda provider: calls.append(provider) + "rius.client.trace.set_tracer_provider", lambda provider: calls.append(provider) ) init(disabled=True) assert calls == [] @@ -57,7 +57,7 @@ def test_enabled_global_init_sets_the_global_provider( ) -> None: calls: list[object] = [] monkeypatch.setattr( - "glassflow.client.trace.set_tracer_provider", lambda provider: calls.append(provider) + "rius.client.trace.set_tracer_provider", lambda provider: calls.append(provider) ) client = init(span_exporter=InMemorySpanExporter(), set_global=True) assert calls == [client._provider] diff --git a/tests/test_masking.py b/tests/test_masking.py index fa9c5d6..546d006 100644 --- a/tests/test_masking.py +++ b/tests/test_masking.py @@ -1,6 +1,6 @@ from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import init +from rius import init def test_mask_redacts_content_attributes() -> None: diff --git a/tests/test_mcp_instrumentation.py b/tests/test_mcp_instrumentation.py index bccd70e..d85a855 100644 --- a/tests/test_mcp_instrumentation.py +++ b/tests/test_mcp_instrumentation.py @@ -28,9 +28,9 @@ MCP_V2 = False -from glassflow import init # noqa: E402 -from glassflow.instrumentation import REGISTRY # noqa: E402 -from glassflow.instrumentation_mcp import MCPInstrumentor # noqa: E402 +from rius import init # noqa: E402 +from rius.instrumentation import REGISTRY # noqa: E402 +from rius.instrumentation_mcp import MCPInstrumentor # noqa: E402 def _make_server() -> Any: @@ -220,7 +220,7 @@ def __init__(self) -> None: def _record_on_fresh_span(result: Any) -> ReadableSpan: - from glassflow.instrumentation_mcp import _record_result + from rius.instrumentation_mcp import _record_result inner = InMemorySpanExporter() client = init(span_exporter=inner, set_global=False) diff --git a/tests/test_observe.py b/tests/test_observe.py index dbde531..94edda2 100644 --- a/tests/test_observe.py +++ b/tests/test_observe.py @@ -6,8 +6,8 @@ from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter from opentelemetry.trace import StatusCode -from glassflow import observe -from glassflow.semconv import SpanKind +from rius import observe +from rius.semconv import SpanKind @observe diff --git a/tests/test_pending_delay.py b/tests/test_pending_delay.py index 2c9fb5f..54a2953 100644 --- a/tests/test_pending_delay.py +++ b/tests/test_pending_delay.py @@ -10,21 +10,21 @@ from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import init -from glassflow.pending import PendingScheduler -from glassflow.semconv import GLASSFLOW_SPAN_PENDING +from rius import init +from rius.pending import PendingScheduler +from rius.semconv import GLASSFLOW_SPAN_PENDING # --- config resolution ------------------------------------------------------- def test_delay_defaults_to_zero() -> None: - from glassflow.config import resolve_config + from rius.config import resolve_config assert resolve_config().partial_spans_delay == 0.0 def test_delay_env_var_and_clamp(monkeypatch) -> None: - from glassflow.config import resolve_config + from rius.config import resolve_config monkeypatch.setenv("GLASSFLOW_PARTIAL_SPANS_DELAY", "2.5") assert resolve_config().partial_spans_delay == 2.5 diff --git a/tests/test_pending_spans.py b/tests/test_pending_spans.py index c1ad3df..ed33464 100644 --- a/tests/test_pending_spans.py +++ b/tests/test_pending_spans.py @@ -10,8 +10,8 @@ from opentelemetry.sdk.trace import SpanProcessor as _SpanProcessor from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import init -from glassflow.semconv import GLASSFLOW_SPAN_PENDING +from rius import init +from rius.semconv import GLASSFLOW_SPAN_PENDING def _memory_client(**kwargs: object): @@ -114,7 +114,7 @@ def test_disabled_kills_pendings_too() -> None: def test_env_var_enables_partial_spans(monkeypatch) -> None: - from glassflow.config import resolve_config + from rius.config import resolve_config monkeypatch.setenv("GLASSFLOW_PARTIAL_SPANS", "true") assert resolve_config().partial_spans is True @@ -147,14 +147,14 @@ def test_sdk_helpers_expose_identity_attributes_at_span_start() -> None: invisible to the snapshot.""" from opentelemetry import trace as otel_trace - import glassflow + import rius recorder = _StartAttributeRecorder() otel_trace.get_tracer_provider().add_span_processor(recorder) # type: ignore[attr-defined] - with glassflow.start_as_current_span("kindly", kind=glassflow.SpanKind.RETRIEVER): + with rius.start_as_current_span("kindly", kind=rius.SpanKind.RETRIEVER): pass - with glassflow.start_as_current_generation("genny", model="gpt-4o", provider="openai"): + with rius.start_as_current_generation("genny", model="gpt-4o", provider="openai"): pass assert recorder.seen["kindly"]["openinference.span.kind"] == "RETRIEVER" diff --git a/tests/test_reliability.py b/tests/test_reliability.py index 24f562c..b664d16 100644 --- a/tests/test_reliability.py +++ b/tests/test_reliability.py @@ -21,7 +21,7 @@ from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow import init +from rius import init class _SlowExporter(SpanExporter): @@ -142,8 +142,8 @@ def test_transient_server_errors_are_retried() -> None: def test_pending_spans_are_flushed_at_interpreter_exit() -> None: server = _start_server(responses=[200]) code = ( - "import glassflow\n" - f'client = glassflow.init(endpoint="http://127.0.0.1:{server.server_port}")\n' + "import rius\n" + f'client = rius.init(endpoint="http://127.0.0.1:{server.server_port}")\n' 'with client.get_tracer().start_as_current_span("exit-op"):\n' " pass\n" "# exit without flush() — the atexit hook must drain the queue\n" diff --git a/tests/test_semconv.py b/tests/test_semconv.py index fc7e588..ba63a61 100644 --- a/tests/test_semconv.py +++ b/tests/test_semconv.py @@ -1,7 +1,7 @@ from opentelemetry import trace from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from glassflow.semconv import ( +from rius.semconv import ( GEN_AI_OPERATION_NAME, OPENINFERENCE_SPAN_KIND, SpanKind, diff --git a/tests/test_serde.py b/tests/test_serde.py index f41236f..cd07a9a 100644 --- a/tests/test_serde.py +++ b/tests/test_serde.py @@ -2,7 +2,7 @@ from __future__ import annotations -from glassflow._serde import MAX_ATTR_CHARS, serialize +from rius._serde import MAX_ATTR_CHARS, serialize class _BrokenRepr: diff --git a/tests/test_spans.py b/tests/test_spans.py index f994a22..32cfe65 100644 --- a/tests/test_spans.py +++ b/tests/test_spans.py @@ -2,8 +2,8 @@ from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter from opentelemetry.trace import StatusCode -from glassflow import start_as_current_span, start_span -from glassflow.semconv import SpanKind +from rius import start_as_current_span, start_span +from rius.semconv import SpanKind # --- context manager: start_as_current_span --- diff --git a/uv.lock b/uv.lock index 54dab2a..4722cb6 100644 --- a/uv.lock +++ b/uv.lock @@ -379,7 +379,7 @@ wheels = [ ] [[package]] -name = "glassflow-ai" +name = "glassflow-rius" source = { editable = "." } dependencies = [ { name = "opentelemetry-api" },