-
Notifications
You must be signed in to change notification settings - Fork 877
Add CLAUDE.md with project structure and commands #4233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| CLAUDE.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # OpenTelemetry Python Contrib | ||
|
|
||
| Monorepo with 50+ OpenTelemetry instrumentation packages for Python. | ||
|
|
||
| ## Structure | ||
|
|
||
| - `instrumentation/` - instrumentation packages (Flask, Django, FastAPI, gRPC, databases, etc.) | ||
| - `instrumentation-genai/` - GenAI instrumentations (Anthropic, Vertex AI, LangChain, etc.) | ||
| - `util/` - shared utilities (`util-http`, `util-genai`) | ||
| - `exporter/` - custom exporters | ||
| - `propagator/` - context propagators | ||
|
|
||
| Each package lives under `src/opentelemetry/instrumentation/{name}/` with its own `pyproject.toml` and `tests/`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| ## Commands | ||
|
|
||
| ```sh | ||
| # Install all packages and dev tools | ||
| uv sync --frozen --all-packages | ||
|
|
||
| # Lint (runs ruff via pre-commit) | ||
| uv run pre-commit run ruff --all-files | ||
|
|
||
| # Test a specific package (append -0, -1, etc. for version variants) | ||
| uv run tox -e py312-test-instrumentation-flask-0 | ||
|
|
||
| # Type check | ||
| uv run tox -e typecheck | ||
| ``` | ||
|
|
||
| ## Guidelines | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are some other nice bits in the AGENTS file the Collector added, especially the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, please. I think we also have started to receive PRs from bot / people throwing a bot at good-first-issue labeled issues. |
||
|
|
||
| - Each package has its own `pyproject.toml` with version, dependencies, and entry points. | ||
| - The monorepo uses `uv` workspaces. | ||
| - `tox.ini` defines the test matrix - check it for available test environments. | ||
| - Do not add `type: ignore` comments. If a type error arises, solve it properly or write a follow-up plan to address it in another PR. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename to AGENTS.md or symlink to it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think Claude checks AGENTS.md, or there's a setting to change that. I've added a symlink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main content should be in AGENTS.md then add
@AGENTS.mdto CLAUDE.md - see here.This makes sure other agents (co-pilot, cursor, etc) follow the guidance, not just Claude.