Skip to content

Commit 44978a3

Browse files
committed
Merge branch 'feat-o11y-overhaul' into feat--o11y-ui-changes
2 parents 4c61a85 + d11a832 commit 44978a3

File tree

113 files changed

+10861
-2684
lines changed

Some content is hidden

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

113 files changed

+10861
-2684
lines changed

.github/workflows/sdk-python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
export SERVER_DEFAULT_ENGINE_VERSION=V1
103103
export SERVER_MSGQUEUE_RABBITMQ_URL="amqp://user:password@localhost:5672/"
104104
export SERVER_OPTIMISTIC_SCHEDULING_ENABLED=${{ matrix.optimistic-scheduling }}
105-
export SERVER_HATCHET_O11Y_ENABLED=true
105+
export SERVER_OBSERVABILITY_ENABLED=true
106106
107107
go run ./cmd/hatchet-admin quickstart
108108
@@ -215,7 +215,7 @@ jobs:
215215
- name: Start engine and API
216216
working-directory: .
217217
run: |
218-
docker compose -f docker-compose.yml -f docker-compose.release.yml up -d hatchet-engine hatchet-api
218+
SERVER_OBSERVABILITY_ENABLED=true docker compose -f docker-compose.yml -f docker-compose.release.yml up -d hatchet-engine hatchet-api
219219
sleep 30
220220
221221
- name: Set up Python
@@ -245,7 +245,7 @@ jobs:
245245
run: |
246246
echo "Testing current SDK against engine ${{ env.LATEST_TAG }}"
247247
echo "Using HATCHET_CLIENT_NAMESPACE: $HATCHET_CLIENT_NAMESPACE"
248-
poetry run pytest -s -vvv --maxfail=5 --capture=no --retries 3 --retry-delay 2 -n auto --ignore=tests/otel_traces
248+
poetry run pytest -s -vvv --maxfail=5 --capture=no --retries 3 --retry-delay 2 -n auto
249249
250250
- name: Collect engine logs
251251
if: always()

.github/workflows/sdk-typescript.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ jobs:
264264
- name: Run e2e tests
265265
env:
266266
HATCHET_CLIENT_TLS_STRATEGY: none
267-
HATCHET_CLIENT_WORKER_HEALTHCHECK_ENABLED: "true"
267+
HATCHET_CLIENT_WORKER_HEALTHCHECK_ENABLED: "false"
268268
NODE_TLS_REJECT_UNAUTHORIZED: "0"
269269
run: |
270270
echo "Testing current SDK against engine ${{ env.LATEST_TAG }}"
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: VS Code Extension Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'vscode/v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Package and Publish VS Code Extension
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '24'
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
version: 10
29+
run_install: false
30+
31+
- name: Get pnpm store directory
32+
shell: bash
33+
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
34+
35+
- name: Cache pnpm store
36+
uses: actions/cache@v4
37+
with:
38+
path: ${{ env.STORE_PATH }}
39+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('frontend/vscode-extension/pnpm-lock.yaml') }}
40+
restore-keys: |
41+
${{ runner.os }}-pnpm-store-
42+
43+
- name: Install dependencies
44+
working-directory: frontend/vscode-extension
45+
run: pnpm install --frozen-lockfile
46+
47+
- name: Build VS Code extension
48+
working-directory: frontend/vscode-extension
49+
run: pnpm build:prod
50+
51+
- name: Extract version from tag
52+
id: version
53+
run: echo "VERSION=${GITHUB_REF_NAME#vscode/v}" >> $GITHUB_OUTPUT
54+
55+
- name: Package extension
56+
working-directory: frontend/vscode-extension
57+
run: pnpm package --out hatchet-${{ steps.version.outputs.VERSION }}.vsix
58+
59+
- name: Publish to VS Code Marketplace
60+
working-directory: frontend/vscode-extension
61+
env:
62+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
63+
run: pnpm run publish
64+
65+
- name: Upload .vsix as release artifact
66+
uses: softprops/action-gh-release@v2
67+
with:
68+
files: frontend/vscode-extension/hatchet-${{ steps.version.outputs.VERSION }}.vsix
69+
name: Hatchet VS Code Extension v${{ steps.version.outputs.VERSION }}
70+
body: |
71+
## Hatchet VS Code Extension v${{ steps.version.outputs.VERSION }}
72+
73+
### Installation
74+
**From VS Code Marketplace:** Search for "Hatchet" in the Extensions panel.
75+
76+
**Manual install:**
77+
```
78+
code --install-extension hatchet-${{ steps.version.outputs.VERSION }}.vsix
79+
```
80+
81+
### Usage
82+
Open any TypeScript file that declares a Hatchet workflow — a
83+
"$(graph) Show Hatchet DAG" CodeLens will appear above each
84+
`hatchet.workflow(...)` declaration.

api-contracts/openapi/openapi.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ paths:
2929
$ref: "./paths/v1/tasks/tasks.yaml#/listTaskEvents"
3030
/api/v1/stable/tasks/{task}/logs:
3131
$ref: "./paths/v1/tasks/tasks.yaml#/listLogs"
32-
/api/v1/stable/tasks/{task}/trace:
33-
$ref: "./paths/v1/tasks/tasks.yaml#/getTrace"
3432
/api/v1/stable/tenants/{tenant}/tasks/cancel:
3533
$ref: "./paths/v1/tasks/tasks.yaml#/cancelTasks"
3634
/api/v1/stable/tenants/{tenant}/logs:
@@ -59,8 +57,8 @@ paths:
5957
$ref: "./paths/v1/workflow-runs/workflow_run.yaml#/getWorkflowRunStatus"
6058
/api/v1/stable/workflow-runs/{v1-workflow-run}/task-events:
6159
$ref: "./paths/v1/workflow-runs/workflow_run.yaml#/listTaskEventsForWorkflowRun"
62-
/api/v1/stable/workflow-runs/{v1-workflow-run}/trace:
63-
$ref: "./paths/v1/workflow-runs/workflow_run.yaml#/getWorkflowRunTrace"
60+
/api/v1/stable/tenants/{tenant}/traces:
61+
$ref: "./paths/v1/observability/traces.yaml#/getTrace"
6462
/api/v1/stable/workflow-runs/{v1-workflow-run}/task-timings:
6563
$ref: "./paths/v1/workflow-runs/workflow_run.yaml#/getTimings"
6664
/api/v1/stable/tenants/{tenant}/task-metrics:
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
getTrace:
2+
get:
3+
x-resources: ["tenant"]
4+
description: Get OTel trace for a workflow run
5+
operationId: v1-observability:get-trace
6+
parameters:
7+
- description: The tenant id
8+
in: path
9+
name: tenant
10+
required: true
11+
schema:
12+
type: string
13+
format: uuid
14+
minLength: 36
15+
maxLength: 36
16+
- description: The workflow run external id
17+
in: query
18+
name: run_external_id
19+
required: true
20+
schema:
21+
type: string
22+
format: uuid
23+
minLength: 36
24+
maxLength: 36
25+
- description: The number of spans to skip
26+
in: query
27+
name: offset
28+
required: false
29+
schema:
30+
type: integer
31+
format: int64
32+
- description: The number of spans to limit by
33+
in: query
34+
name: limit
35+
required: false
36+
schema:
37+
type: integer
38+
format: int64
39+
responses:
40+
"200":
41+
content:
42+
application/json:
43+
schema:
44+
$ref: "../../../components/schemas/_index.yaml#/OtelSpanList"
45+
description: Successfully retrieved the OTel trace
46+
"400":
47+
content:
48+
application/json:
49+
schema:
50+
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
51+
description: A malformed or bad request
52+
"403":
53+
content:
54+
application/json:
55+
schema:
56+
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
57+
description: Forbidden
58+
summary: Get OTel trace
59+
tags:
60+
- Observability

api-contracts/openapi/paths/v1/tasks/tasks.yaml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -441,64 +441,6 @@ replayTasks:
441441
tags:
442442
- Task
443443

444-
getTrace:
445-
get:
446-
x-resources: ["tenant", "task"]
447-
description: Get OTel trace for a task run
448-
operationId: v1-task:get:trace
449-
parameters:
450-
- description: The task id
451-
in: path
452-
name: task
453-
required: true
454-
schema:
455-
type: string
456-
format: uuid
457-
minLength: 36
458-
maxLength: 36
459-
- description: The number to skip
460-
in: query
461-
name: offset
462-
required: false
463-
schema:
464-
type: integer
465-
format: int64
466-
- description: The number to limit by
467-
in: query
468-
name: limit
469-
required: false
470-
schema:
471-
type: integer
472-
format: int64
473-
responses:
474-
"200":
475-
content:
476-
application/json:
477-
schema:
478-
$ref: "../../../components/schemas/_index.yaml#/OtelSpanList"
479-
description: Successfully retrieved the OTel trace
480-
"400":
481-
content:
482-
application/json:
483-
schema:
484-
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
485-
description: A malformed or bad request
486-
"403":
487-
content:
488-
application/json:
489-
schema:
490-
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
491-
description: Forbidden
492-
"404":
493-
content:
494-
application/json:
495-
schema:
496-
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
497-
description: The task was not found
498-
summary: Get OTel trace
499-
tags:
500-
- Task
501-
502444
restoreTask:
503445
post:
504446
x-resources: ["tenant", "task"]

api-contracts/openapi/paths/v1/workflow-runs/workflow_run.yaml

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -485,63 +485,6 @@ trigger:
485485
tags:
486486
- Workflow Runs
487487

488-
getWorkflowRunTrace:
489-
get:
490-
x-resources: ["tenant", "v1-workflow-run"]
491-
description: Get OTel trace for a workflow run
492-
operationId: v1-workflow-run:get:trace
493-
parameters:
494-
- description: The workflow run id
495-
in: path
496-
name: v1-workflow-run
497-
required: true
498-
schema:
499-
type: string
500-
format: uuid
501-
minLength: 36
502-
maxLength: 36
503-
- description: The number to skip
504-
in: query
505-
name: offset
506-
required: false
507-
schema:
508-
type: integer
509-
format: int64
510-
- description: The number to limit by
511-
in: query
512-
name: limit
513-
required: false
514-
schema:
515-
type: integer
516-
format: int64
517-
responses:
518-
"200":
519-
content:
520-
application/json:
521-
schema:
522-
$ref: "../../../components/schemas/_index.yaml#/OtelSpanList"
523-
description: Successfully retrieved the OTel trace
524-
"400":
525-
content:
526-
application/json:
527-
schema:
528-
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
529-
description: A malformed or bad request
530-
"403":
531-
content:
532-
application/json:
533-
schema:
534-
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
535-
description: Forbidden
536-
"404":
537-
content:
538-
application/json:
539-
schema:
540-
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
541-
description: The workflow run was not found
542-
summary: Get OTel trace
543-
tags:
544-
- Workflow Runs
545488

546489
branchDurableTask:
547490
post:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package observability
2+
3+
import (
4+
"github.com/hatchet-dev/hatchet/pkg/config/server"
5+
)
6+
7+
type V1ObservabilityService struct {
8+
config *server.ServerConfig
9+
}
10+
11+
func NewV1ObservabilityService(config *server.ServerConfig) *V1ObservabilityService {
12+
13+
return &V1ObservabilityService{
14+
config: config,
15+
}
16+
}

0 commit comments

Comments
 (0)