Skip to content

Set up Cursor Cloud dev environment#219

Draft
123liuziming wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-4a61
Draft

Set up Cursor Cloud dev environment#219
123liuziming wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-4a61

Conversation

@123liuziming

Copy link
Copy Markdown
Collaborator

Summary

Sets up the development environment for this OpenTelemetry Python Contrib / LoongSuite instrumentation monorepo and documents it for future Cursor Cloud agents. No product code is changed.

  • Adds AGENTS.md with a ## Cursor Cloud specific instructions section describing the uv + tox workflow, common commands, required system build libs, and non-obvious gotchas.

Environment setup performed

  • Installed uv and system build libs (build-essential pkg-config libpq-dev default-libmysqlclient-dev librdkafka-dev libsnappy-dev python3-dev) needed to compile native deps (psycopg2, mysqlclient, etc.).
  • uv sync builds the dev virtualenv at .venv/ (all workspace packages + tox/tox-uv/pre-commit).
  • Update script (run on VM startup): installs uv if missing, then uv sync.

Verification

Check Command Result
Lint .venv/bin/tox -e ruff ✅ ruff/format/uv-lock/rstcheck passed
Tests (upstream) .venv/bin/tox -e py312-test-instrumentation-requests ✅ 80 passed
Tests (LoongSuite) .venv/bin/tox -c tox-loongsuite.ini -e py312-test-loongsuite-instrumentation-langchain-latest ✅ 150 passed
Hello-world Programmatic RequestsInstrumentor + ConsoleSpanExporter GET example.com ✅ CLIENT span emitted, http.status_code: 200

Hello-world span output

hello_world_span.log

Gotcha discovered

The opentelemetry-instrument auto-instrumentation CLI currently fails in the uv sync venv (core API/SDK pinned to upstream main is ahead of the bundled logging instrumentor: LogRecord.__init__() got an unexpected keyword argument 'context'). Per-package tox envs are unaffected (they pin CORE_REPO_SHA). Use programmatic instrumentation for quick smoke tests. Documented in AGENTS.md.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Co-authored-by: Liu Ziming <123liuziming@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants