diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e06e7dcd3..ad04a61578 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,7 @@ If you are using AI agents to assist with contributions, please read [AGENTS.md] - [Find a Buddy and get Started Quickly](#find-a-buddy-and-get-started-quickly) - [Development](#development) - [Virtual Environment](#virtual-environment) + - [Virtual Environment Including Local Core Repository](#virtual-environment-including-local-core-repository) - [Troubleshooting](#troubleshooting) - [Benchmarks](#benchmarks) - [Pull Requests](#pull-requests) @@ -120,6 +121,26 @@ uv sync This will create a virtual environment in the `.venv` directory and install all the necessary dependencies. +#### Virtual Environment Including Local Core Repository + +If you also have a local clone of [`opentelemetry-python`](https://github.com/open-telemetry/opentelemetry-python) and want `uv` to use your local clone to resolve core dependencies, you can run the following commands after **activating the virtual environment created in the previous step**. + +Note you may have to replace `../opentelemetry-python` with the path to your local clone. + +```sh +uv sync --project ../opentelemetry-python --active --inexact +``` + +How you activate the virtual environment is platform specific. Some examples: +```sh +source .venv/bin/activate # Linux +``` + +```ps1 +.venv\Scripts\activate.ps1 # Windows Powershell +.venv\Scripts\activate.bat # Windows CMD +``` + ### Troubleshooting Some packages may require additional system-wide dependencies to be installed. For example, you may need to install `libpq-dev` to run the postgresql client libraries instrumentation tests or `libsnappy-dev` to run the prometheus exporter tests. If you encounter a build error, please check the installation instructions for the package you are trying to run tests for. diff --git a/pyproject.toml b/pyproject.toml index 3ecc82f262..cd91d677c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ dependencies = [ "opentelemetry-instrumentation", "opentelemetry-distro", "opentelemetry-test-utils", + "opentelemetry-exporter-otlp", "opentelemetry-exporter-prometheus-remote-write", "opentelemetry-exporter-richconsole", "opentelemetry-instrumentation-aio-pika[instruments]",