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
56 changes: 56 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
*.egg-info/
dist/
build/
*.egg

# Virtual environments
.venv/
venv/
ENV/
env/

# Testing
.pytest_cache/
.coverage
htmlcov/
.mypy_cache/
.ruff_cache/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Git
.git/
.gitignore

# Documentation
*.md
!README.md
docs/

# CI/CD
.github/

# Environment files (include these at runtime instead)
.env
.env.local
.env.*.local

# UV cache
.uv/

# macOS
.DS_Store

# Tests
tests/
26 changes: 26 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Backend Configuration
# Supported backends: jaeger, tempo, traceloop
BACKEND_TYPE=jaeger

# Backend URL (required)
# Examples:
# Jaeger: http://localhost:16686
# Tempo: http://localhost:3200
# Traceloop: https://api.traceloop.com/v2
BACKEND_URL=http://localhost:16686

# Optional: API key for authenticated backends (mainly for Traceloop)
BACKEND_API_KEY=

# Optional: Comma-separated list of environments for Traceloop backend (default: production)
# Only used when BACKEND_TYPE=traceloop
BACKEND_ENVIRONMENTS=production

# Optional: Request timeout in seconds (default: 30)
BACKEND_TIMEOUT=30

# Optional: Logging level (DEBUG, INFO, WARNING, ERROR)
LOG_LEVEL=INFO

# Optional: Maximum traces per query (default: 100, max: 1000)
MAX_TRACES_PER_QUERY=100
Comment thread
doronkopit5 marked this conversation as resolved.
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup UV
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: uv sync --dev
- name: Lint with Ruff
run: uv run ruff check --output-format=github
- name: Lint with Mypy
run: uv run mypy .
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup UV
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: uv sync --dev
- name: Test with pytest
run: uv run pytest
build-test:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
platform: [amd64, arm64]
include:
- platform: amd64
runs-on: ubuntu-latest
docker-platform: linux/amd64
- platform: arm64
runs-on: Linux-ARM64
docker-platform: linux/arm64
Comment on lines +48 to +60
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Clarify matrix configuration for platform-specific runners.

The build-test job specifies runs-on: ubuntu-latest at the job level (line 50), but the matrix includes different runs-on values for each platform (lines 56, 59). The matrix's runs-on field won't override the job-level setting in this configuration.

To properly use different runners per platform, you need to reference the matrix value in the job's runs-on:

 build-test:
     needs: test
-    runs-on: ubuntu-latest
+    runs-on: ${{ matrix.runs-on }}
     strategy:
         matrix:
             platform: [amd64, arm64]
             include:
                 - platform: amd64
                   runs-on: ubuntu-latest
                   docker-platform: linux/amd64
                 - platform: arm64
                   runs-on: Linux-ARM64
                   docker-platform: linux/arm64

Also note that "Linux-ARM64" runners are typically self-hosted and may not be available in all GitHub organizations.

Verify that the Linux-ARM64 runner is available in your GitHub organization, or consider using GitHub's hosted ARM runners if available in your plan.


I'll verify the review comment's claims about GitHub Actions matrix configuration and available runners.




🌐 Web query:

GitHub Actions matrix runs-on override job level configuration

💡 Result:

Short answer: GitHub Actions doesn't automatically override a job's runs-on from the matrix — you must explicitly use a matrix expression for runs-on (e.g. runs-on: ${{ matrix.os }}) or put runner labels into matrix include values and reference them. For self‑hosted runners some runners (e.g. CodeBuild-hosted) accept label-style overrides inside runs-on entries. [1][2][3]

How to do it:

  • Standard: define an os (or runner-label) in your matrix and set runs-on: ${{ matrix.os }}. This makes each matrix leg run on that runner. [2]
  • Use include/exclude to add or remove specific matrix combinations (and extra per-leg variables you can reference in runs-on). [2][3]
  • Self-hosted/third-party runners: some providers support label overrides inside the runs-on array (provider-specific syntax). Example: CodeBuild-hosted runner supports label overrides like image:${{ matrix.os }}. Check your runner provider docs. [4]

Example minimal snippet:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }} <-- required to override per-matrix

Sources: GitHub Docs (matrix usage) [2], community Q&A explaining runs-on behavior [1], matrix include/exclude examples [3], and provider-specific label overrides (CodeBuild example) [4].


🌐 Web query:

GitHub Actions available runners Linux ARM64

💡 Result:

Available GitHub-hosted Linux ARM64 runner labels (current GitHub docs):

  • ubuntu-24.04-arm. [1]
  • ubuntu-22.04-arm. [1]

Notes:

  • Arm64 standard runners are available for public repositories (and GitHub’s larger/private options exist — see docs for pricing/availability). [2][3]

Sources: [1] GitHub-hosted runners reference; [2] GitHub Changelog (arm64 runners GA); [3] actions/runner-images repo.


Matrix configuration prevents platform-specific runners from being used.

The job-level runs-on: ubuntu-latest (line 50) is not overridden by the matrix include values. The matrix entries for runs-on will be ignored, causing both amd64 and arm64 builds to run on ubuntu-latest.

To use different runners per platform, explicitly reference the matrix value:

 build-test:
     needs: test
-    runs-on: ubuntu-latest
+    runs-on: ${{ matrix.runs-on }}
     strategy:
         matrix:
             platform: [amd64, arm64]
             include:
                 - platform: amd64
                   runs-on: ubuntu-latest
                   docker-platform: linux/amd64
                 - platform: arm64
                   runs-on: Linux-ARM64
                   docker-platform: linux/arm64

Note: "Linux-ARM64" is not a standard GitHub-hosted runner. Verify it exists as a self-hosted runner in your organization, or consider using GitHub's hosted ARM64 runners (ubuntu-24.04-arm or ubuntu-22.04-arm) if available in your plan.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
build-test:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
platform: [amd64, arm64]
include:
- platform: amd64
runs-on: ubuntu-latest
docker-platform: linux/amd64
- platform: arm64
runs-on: Linux-ARM64
docker-platform: linux/arm64
build-test:
needs: test
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
platform: [amd64, arm64]
include:
- platform: amd64
runs-on: ubuntu-latest
docker-platform: linux/amd64
- platform: arm64
runs-on: Linux-ARM64
docker-platform: linux/arm64
🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 48 to 60: the job-level runs-on:
ubuntu-latest is overriding matrix include values so matrix-specific runners are
ignored; replace the static runs-on with the matrix value (e.g. set runs-on: ${{
matrix.runs-on }}), remove or adjust the top-level runs-on, and ensure the
matrix includes use valid runner labels (verify "Linux-ARM64" exists as a
self-hosted runner or use a GitHub-hosted ARM label like
ubuntu-24.04-arm/ubuntu-22.04-arm); keep docker-platform in the matrix and use
that value in the workflow steps when starting containers.

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Create GH token file
run: echo "${{ secrets.GH_ACCESS_TOKEN }}" > gh_token.txt

- name: Docker Build
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.docker-platform }}
context: .
push: false
secret-files: |
"gh_token=gh_token.txt"
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
Loading
Loading