Skip to content

Commit e12167b

Browse files
authored
feat: Initial commit of OpenTelemetry MCP Server (#2)
1 parent b4e9d22 commit e12167b

File tree

105 files changed

+77559
-1
lines changed

Some content is hidden

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

105 files changed

+77559
-1
lines changed

.dockerignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
*.egg-info/
8+
dist/
9+
build/
10+
*.egg
11+
12+
# Virtual environments
13+
.venv/
14+
venv/
15+
ENV/
16+
env/
17+
18+
# Testing
19+
.pytest_cache/
20+
.coverage
21+
htmlcov/
22+
.mypy_cache/
23+
.ruff_cache/
24+
25+
# IDE
26+
.vscode/
27+
.idea/
28+
*.swp
29+
*.swo
30+
*~
31+
32+
# Git
33+
.git/
34+
.gitignore
35+
36+
# Documentation
37+
*.md
38+
!README.md
39+
docs/
40+
41+
# CI/CD
42+
.github/
43+
44+
# Environment files (include these at runtime instead)
45+
.env
46+
.env.local
47+
.env.*.local
48+
49+
# UV cache
50+
.uv/
51+
52+
# macOS
53+
.DS_Store
54+
55+
# Tests
56+
tests/

.env.example

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Backend Configuration
2+
# Supported backends: jaeger, tempo, traceloop
3+
BACKEND_TYPE=jaeger
4+
5+
# Backend URL (required)
6+
# Examples:
7+
# Jaeger: http://localhost:16686
8+
# Tempo: http://localhost:3200
9+
# Traceloop: https://api.traceloop.com/v2
10+
BACKEND_URL=http://localhost:16686
11+
12+
# Optional: API key for authenticated backends (mainly for Traceloop)
13+
BACKEND_API_KEY=
14+
15+
# Optional: Comma-separated list of environments for Traceloop backend (default: production)
16+
# Only used when BACKEND_TYPE=traceloop
17+
BACKEND_ENVIRONMENTS=production
18+
19+
# Optional: Request timeout in seconds (default: 30)
20+
BACKEND_TIMEOUT=30
21+
22+
# Optional: Logging level (DEBUG, INFO, WARNING, ERROR)
23+
LOG_LEVEL=INFO
24+
25+
# Optional: Maximum traces per query (default: 100, max: 1000)
26+
MAX_TRACES_PER_QUERY=100

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup UV
16+
uses: astral-sh/setup-uv@v3
17+
with:
18+
version: "latest"
19+
enable-cache: true
20+
- name: Setup Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.12"
24+
- name: Install dependencies
25+
run: uv sync --dev
26+
- name: Lint with Ruff
27+
run: uv run ruff check --output-format=github
28+
- name: Lint with Mypy
29+
run: uv run mypy .
30+
test:
31+
name: Test
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Setup UV
36+
uses: astral-sh/setup-uv@v3
37+
with:
38+
version: "latest"
39+
enable-cache: true
40+
- name: Setup Python
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: "3.12"
44+
- name: Install dependencies
45+
run: uv sync --dev
46+
- name: Test with pytest
47+
run: uv run pytest
48+
build-test:
49+
needs: test
50+
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
platform: [amd64, arm64]
54+
include:
55+
- platform: amd64
56+
runs-on: ubuntu-latest
57+
docker-platform: linux/amd64
58+
- platform: arm64
59+
runs-on: Linux-ARM64
60+
docker-platform: linux/arm64
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: Set up Docker Buildx
65+
uses: docker/setup-buildx-action@v3
66+
67+
- name: Create GH token file
68+
run: echo "${{ secrets.GH_ACCESS_TOKEN }}" > gh_token.txt
69+
70+
- name: Docker Build
71+
uses: docker/build-push-action@v6
72+
with:
73+
platforms: ${{ matrix.docker-platform }}
74+
context: .
75+
push: false
76+
secret-files: |
77+
"gh_token=gh_token.txt"

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

0 commit comments

Comments
 (0)