Skip to content
Merged
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
6 changes: 0 additions & 6 deletions dashfrog/.devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@ services:
extends:
file: ../docker-compose.test.yml
service: postgres
profiles:
- services

otel-collector:
extends:
file: ../docker-compose.test.yml
service: otel-collector
profiles:
- services

prometheus:
extends:
file: ../docker-compose.test.yml
service: prometheus
profiles:
- services

networks:
dashfrog:
Expand Down
8 changes: 7 additions & 1 deletion dashfrog/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
"args": ["dashfrog.api:app", "--reload"],
"console": "integratedTerminal",
"justMyCode": false,
"env": {
"DASHFROG_POSTGRES_HOST": "postgres",
"DASHFROG_OTLP_ENDPOINT": "grpc://otel-collector:4317"
}
},
{
"name": "Python: Current File",
Expand All @@ -69,7 +73,9 @@
"justMyCode": false,
"cwd": "${workspaceFolder}",
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
"PYTHONPATH": "${workspaceFolder}/src",
"DASHFROG_POSTGRES_HOST": "postgres",
"DASHFROG_OTLP_ENDPOINT": "grpc://otel-collector:4317"
}
}
]
Expand Down
9 changes: 5 additions & 4 deletions dashfrog/demo-app/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,14 @@ def create_status_page_notebook(customer_id: str, api_url: str = "http://localho
{"names": ["data_import"], "filters": [{"label": "env", "value": "prod"}]},
{"names": ["data_import"], "filters": [{"label": "env", "value": "prod"}]},
],
"metricBlocksFilters": [],
"metricBlocksFilters": [
{"names": [metric_name], "filters": []}
for metric_name in ["computation_duration", "computation_count", "monthly_quota"]
],
"isPublic": False,
}

response = requests.post(
f"{api_url}/api/notebooks/{notebook_id}/update", headers=headers, json=update_payload
)
response = requests.post(f"{api_url}/api/notebooks/{notebook_id}/update", headers=headers, json=update_payload)
response.raise_for_status()

NOTEBOOKS_CREATED.add(customer_id)
Expand Down
2 changes: 1 addition & 1 deletion dashfrog/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dashfrog"
version = "0.1.10"
version = "0.1.11"
description = "Business Observability on OpenTelemetry"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
8 changes: 7 additions & 1 deletion dashfrog/src/dashfrog/api/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ class FlowSearchRequest(BaseModel):
"""Request body for searching/listing flows."""

notebook_id: UUID
flow_name: str | None = Field(None, description="Name of the flow to get details for")
start: datetime = Field(..., description="Start datetime for filtering flow events")
end: datetime = Field(..., description="End datetime for filtering flow events")
labels: list[LabelFilter] = Field(default_factory=list, description="Label filters as key-value pairs")
Expand Down Expand Up @@ -210,6 +211,9 @@ async def search_flows(
FlowEvent.tenant == request.tenant,
]

if request.flow_name is not None:
base_filters.append(FlowEvent.flow_metadata["flow_name"].astext == request.flow_name)

# Add label filters
for label_filter in request.labels:
base_filters.append(
Expand All @@ -230,7 +234,9 @@ async def search_flows(
request.tenant,
request.start,
request.end,
flow_filter=BlockFilters(names=[], filters=request.labels),
flow_filter=BlockFilters(
names=[] if request.flow_name is None else [request.flow_name], filters=request.labels
),
)

return list(flow_generator(session, base_filters))
Expand Down
2 changes: 1 addition & 1 deletion dashfrog/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/src/blocks/FlowStatusBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ export const FlowStatusBlock = createReactBlockSpec(
endDate,
filters,
currentNotebook.id,
flowName,
);
setSelectedFlows(flows.filter((flow) => flow.name === flowName));
setSelectedFlows(flows);
} catch (_) {
setSelectedFlows([]);
}
Expand Down
8 changes: 0 additions & 8 deletions frontend/src/routes/NotebookView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ export default function NotebookView() {

const tenantName = tenant ? decodeURIComponent(tenant) : "";

const fetchComments = useNotebooksStore((state) => state.fetchComments);

// Fetch comments when start or end dates change
useEffect(() => {
if (!notebookId) return;
void fetchComments(notebookId);
}, [notebookId, fetchComments]);

useEffect(() => {
const fetchNotebook = async () => {
if (!tenantName || !notebookId) return;
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/services/api/flows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const Flows = {
end: Date,
labels: Filter[],
notebookId: string,
flowName?: string,
) => {
const response = await fetchWithAuth(`/api/flows/search`, {
method: "POST",
Expand All @@ -135,6 +136,7 @@ const Flows = {
tenant,
labels,
notebook_id: notebookId,
flow_name: flowName,
}),
});
const data = (await response.json()) as FlowApiResponse[];
Expand Down