feat: optional OpenLLMetry tracing via traceloop-sdk#52
Open
feat: optional OpenLLMetry tracing via traceloop-sdk#52
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 wiringrun_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.yamlfor local Jaeger stack--build-arg TELEMETRY=1support for tracing-enabled image.env.example— telemetry variable template with privacy guidancetests/test_telemetry.py— 20 unit tests (no Docker required).gitignoreentries for.envand.mcp.jsonFixed
[dev]lower bound tightened to>=1.38.0CI
test_telemetry.pyadded to shard 5Split from #51.