Skip to content

feat: optional OpenLLMetry tracing via traceloop-sdk#52

Open
anchapin wants to merge 1 commit intodevelopfrom
feat/telemetry
Open

feat: optional OpenLLMetry tracing via traceloop-sdk#52
anchapin wants to merge 1 commit intodevelopfrom
feat/telemetry

Conversation

@anchapin
Copy link
Copy Markdown
Collaborator

Summary

Adds optional distributed tracing via OpenLLMetry (traceloop-sdk), built on OpenTelemetry. Zero overhead when disabled.

Added

  • mcp_server/telemetry.py — span instrumentation and McpInstrumentor wiring
  • Instruments: run_simulation, apply_measure, create_measure, create_*_building, run_qaqc_checks
  • [telemetry] optional extra in pyproject.toml (pip install 'openstudio-mcp[telemetry]')
  • docker/docker-compose.tracing.yml + otel-collector-config.yaml for local Jaeger stack
  • Dockerfile --build-arg TELEMETRY=1 support for tracing-enabled image
  • .env.example — telemetry variable template with privacy guidance
  • tests/test_telemetry.py — 20 unit tests (no Docker required)
  • .gitignore entries for .env and .mcp.json

Fixed

  • opentelemetry-sdk [dev] lower bound tightened to >=1.38.0
  • README tracing Docker example corrected image tag
  • TRACELOOP_TRACE_CONTENT docs expanded with privacy warning

CI

  • Smoke-install telemetry extra in build job
  • test_telemetry.py added to shard 5

Split from #51.

- Add mcp_server/telemetry.py with span instrumentation and McpInstrumentor wiring
- Instrument run_simulation, apply_measure, create_measure, create_*_building, run_qaqc_checks
- Add [telemetry] optional extra in pyproject.toml (traceloop-sdk)
- Tighten opentelemetry-sdk [dev] lower bound to >=1.38.0
- Add docker/docker-compose.tracing.yml + otel-collector-config.yaml for local Jaeger stack
- Update Dockerfile with --build-arg TELEMETRY=1 support for tracing-enabled image
- Add .env.example with telemetry variable template and privacy guidance
- Add .gitignore entries for .env and .mcp.json
- Add tests/test_telemetry.py (20 unit tests, no Docker required)
- CI: smoke-install telemetry extra; add test_telemetry.py to shard 5

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant