phlo-clickstack 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/PKG-INFO +1 -1
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/README.md +4 -10
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/pyproject.toml +1 -1
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/cli.py +12 -5
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/service.yaml +7 -15
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/PKG-INFO +1 -1
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/tests/test_clickstack_cli.py +3 -1
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/tests/test_clickstack_plugin.py +6 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/setup.cfg +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/__init__.py +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/authorization.py +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/cli_plugin.py +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/observability_backend.py +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/plugin.py +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/resource_provider.py +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/SOURCES.txt +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/dependency_links.txt +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/entry_points.txt +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/requires.txt +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/top_level.txt +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/tests/test_authorization.py +0 -0
- {phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/tests/test_observability_backend.py +0 -0
|
@@ -5,8 +5,7 @@ ClickStack observability service for Phlo.
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
7
|
`phlo-clickstack` packages the official ClickStack all-in-one image so Phlo can
|
|
8
|
-
|
|
9
|
-
traces in one UI.
|
|
8
|
+
query ClickHouse-backed observability data and link to the HyperDX UI.
|
|
10
9
|
|
|
11
10
|
## Installation
|
|
12
11
|
|
|
@@ -27,11 +26,6 @@ phlo services start --service clickstack
|
|
|
27
26
|
phlo clickstack query "SELECT count() FROM default.otel_logs"
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
|
|
34
|
-
export OTEL_TRACES_EXPORTER=otlp
|
|
35
|
-
export OTEL_METRICS_EXPORTER=otlp
|
|
36
|
-
export OTEL_LOGS_EXPORTER=otlp
|
|
37
|
-
```
|
|
29
|
+
The bundled all-in-one image exposes the HyperDX UI and ClickHouse query ports.
|
|
30
|
+
Use Alloy or another collector for OTLP ingest; this service does not publish
|
|
31
|
+
OTLP ports by default because the image does not listen on those ports.
|
|
@@ -17,6 +17,13 @@ from phlo.cli.commands.services import utils as services_utils
|
|
|
17
17
|
from phlo.cli.infrastructure.command import CommandError, run_command
|
|
18
18
|
from phlo.cli.infrastructure.compose import compose_base_cmd
|
|
19
19
|
from phlo.cli.infrastructure.utils import get_project_name
|
|
20
|
+
from phlo.cli.output import (
|
|
21
|
+
empty_file_error,
|
|
22
|
+
exclusive_options_error,
|
|
23
|
+
file_read_error,
|
|
24
|
+
missing_phlo_project_error,
|
|
25
|
+
missing_query_error,
|
|
26
|
+
)
|
|
20
27
|
from phlo.logging import get_logger
|
|
21
28
|
|
|
22
29
|
logger = get_logger(__name__)
|
|
@@ -44,18 +51,18 @@ def _read_query(*, query: str | None, file: Path | None) -> str:
|
|
|
44
51
|
|
|
45
52
|
"""
|
|
46
53
|
if query and file:
|
|
47
|
-
raise
|
|
54
|
+
raise exclusive_options_error("an inline query", "--file")
|
|
48
55
|
if file is not None:
|
|
49
56
|
try:
|
|
50
57
|
sql = file.read_text(encoding="utf-8")
|
|
51
58
|
except OSError as exc:
|
|
52
|
-
raise
|
|
59
|
+
raise file_read_error(file) from exc
|
|
53
60
|
if sql.strip():
|
|
54
61
|
return sql
|
|
55
|
-
raise
|
|
62
|
+
raise empty_file_error(file)
|
|
56
63
|
if query and query.strip():
|
|
57
64
|
return query
|
|
58
|
-
raise
|
|
65
|
+
raise missing_query_error(command_hint='phlo clickstack query "SELECT 1"')
|
|
59
66
|
|
|
60
67
|
|
|
61
68
|
def _ensure_phlo_dir() -> Path:
|
|
@@ -74,7 +81,7 @@ def _ensure_phlo_dir() -> Path:
|
|
|
74
81
|
phlo_dir = Path.cwd() / ".phlo"
|
|
75
82
|
if phlo_dir.exists():
|
|
76
83
|
return phlo_dir
|
|
77
|
-
raise
|
|
84
|
+
raise missing_phlo_project_error()
|
|
78
85
|
|
|
79
86
|
|
|
80
87
|
def _require_container_backend() -> None:
|
|
@@ -12,13 +12,11 @@ compose:
|
|
|
12
12
|
environment:
|
|
13
13
|
FRONTEND_URL: ${CLICKSTACK_PUBLIC_URL:-}
|
|
14
14
|
ports:
|
|
15
|
-
- "${CLICKSTACK_PORT:-
|
|
16
|
-
- "${CLICKSTACK_HTTP_PORT:-
|
|
17
|
-
- "${
|
|
18
|
-
- "${CLICKSTACK_OTLP_HTTP_PORT:-4318}:4318"
|
|
19
|
-
- "${CLICKSTACK_NATIVE_PORT:-9000}:9000"
|
|
15
|
+
- "${CLICKSTACK_PORT:-18080}:8080"
|
|
16
|
+
- "${CLICKSTACK_HTTP_PORT:-18123}:8123"
|
|
17
|
+
- "${CLICKSTACK_NATIVE_PORT:-19002}:9000"
|
|
20
18
|
volumes:
|
|
21
|
-
-
|
|
19
|
+
- clickstack-data:/var/lib/clickhouse
|
|
22
20
|
healthcheck:
|
|
23
21
|
test:
|
|
24
22
|
[
|
|
@@ -38,19 +36,13 @@ env_vars:
|
|
|
38
36
|
default: "docker.hyperdx.io/hyperdx/hyperdx-all-in-one"
|
|
39
37
|
description: Official ClickStack all-in-one image reference
|
|
40
38
|
CLICKSTACK_PORT:
|
|
41
|
-
default:
|
|
39
|
+
default: 18080
|
|
42
40
|
description: ClickStack UI port
|
|
43
41
|
CLICKSTACK_HTTP_PORT:
|
|
44
|
-
default:
|
|
42
|
+
default: 18123
|
|
45
43
|
description: ClickHouse HTTP query port used by phlo-api trace endpoints
|
|
46
|
-
CLICKSTACK_OTLP_GRPC_PORT:
|
|
47
|
-
default: 4317
|
|
48
|
-
description: ClickStack OTLP gRPC ingest port
|
|
49
|
-
CLICKSTACK_OTLP_HTTP_PORT:
|
|
50
|
-
default: 4318
|
|
51
|
-
description: ClickStack OTLP HTTP ingest port
|
|
52
44
|
CLICKSTACK_NATIVE_PORT:
|
|
53
|
-
default:
|
|
45
|
+
default: 19002
|
|
54
46
|
description: ClickHouse native port exposed by the all-in-one image
|
|
55
47
|
CLICKSTACK_PUBLIC_URL:
|
|
56
48
|
default: ""
|
|
@@ -148,7 +148,9 @@ def test_clickstack_query_rejects_missing_input(monkeypatch) -> None:
|
|
|
148
148
|
result = CliRunner().invoke(clickstack_group, ["query"])
|
|
149
149
|
|
|
150
150
|
assert result.exit_code != 0
|
|
151
|
-
assert "
|
|
151
|
+
assert "Error: no SQL query provided" in result.output
|
|
152
|
+
assert "Provide an inline query argument or pass --file." in result.output
|
|
153
|
+
assert 'Run: phlo clickstack query "SELECT 1"' in result.output
|
|
152
154
|
|
|
153
155
|
|
|
154
156
|
def test_clickstack_query_surfaces_timeout(monkeypatch) -> None:
|
|
@@ -10,6 +10,12 @@ def test_clickstack_service_definition() -> None:
|
|
|
10
10
|
|
|
11
11
|
assert defn["name"] == "clickstack"
|
|
12
12
|
assert defn["profile"] == "observability"
|
|
13
|
+
assert "${CLICKSTACK_PORT:-18080}:8080" in defn["compose"]["ports"]
|
|
14
|
+
assert "${CLICKSTACK_HTTP_PORT:-18123}:8123" in defn["compose"]["ports"]
|
|
15
|
+
assert "${CLICKSTACK_NATIVE_PORT:-19002}:9000" in defn["compose"]["ports"]
|
|
16
|
+
assert not any("4317" in port or "4318" in port for port in defn["compose"]["ports"])
|
|
17
|
+
assert "clickstack-data:/var/lib/clickhouse" in defn["compose"]["volumes"]
|
|
18
|
+
assert "./volumes/clickstack:/var/lib/clickhouse" not in defn["compose"]["volumes"]
|
|
13
19
|
|
|
14
20
|
|
|
15
21
|
def test_clickstack_plugin_metadata() -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack/observability_backend.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{phlo_clickstack-0.3.0 → phlo_clickstack-0.3.1}/src/phlo_clickstack.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|