Docs and package pages: install from the registries

Merged
ST
1mo ago
+193-164

Requested by Bill · project thread

The SDKs are on PyPI, npm, Maven Central and NuGet at 0.1.1, but every package page and guide still says "until it is published" and builds from a checkout. That's the first thing a newcomer sees on pypi.org and npmjs.com. This PR changes each one to install from its registry.

I checked every recipe by hand against the published 0.1.1 packages in a clean environment, with the reference server sending a policy (mask secret, logs at warn) and an OTLP sink:

RecipeConnect linePolicy
pip install pydantic-opamp-otel + opentelemetry-instrumentshown by defaultAPPLIED, masked, info dropped
npm install @pydantic/opamp-otel + --import .../registershown by defaultAPPLIED, masked, info dropped
Maven Central extension jar + agent 2.31.1shownAPPLIED, masked, info dropped
dotnet add package Pydantic.OpAmp.Extensions.Hosting + WithOpAmp()shownAPPLIED, masked, info dropped
dotnet add package OpenTelemetry.AutoInstrumentation 1.17.0 + Pydantic.OpAmp.AutoInstrumentation, instrument.shshownAPPLIED, masked, info dropped

Changes

  • READMEs that PyPI, npm and NuGet show (python/, python/otel, node/opamp, node/otel, dotnet/, both .NET plugin packages): install from the registry. Relative links become absolute GitHub links, because relative ones 404 on the registry pages. "enrollment key" becomes "key", since apps don't enroll. The notes saying the connect line needs INFO or OTEL_LOG_LEVEL=info are gone: it shows by default since #108.

  • NuGet metadata: PackageReadmeFile and the README packed (today the NuGet pages have no README), Authors Pydantic (today it's the package id), PackageProjectUrl and tags. dotnet pack checked: the nuspec has readme, authors, projectUrl and tags.

  • Docs: getting-started.md lists the package names; python.md, python-otel.md, node.md, node-otel.md, java.md (0.1.1, plus Gradle), javaagent.md (Maven Central jar), dotnet.md, dotnet-otel.md and guides/elastic.md all install from the registry. The top-level README table gains an Install column, with the OpenTelemetry integration listed first.

  • Changelog: the SDKs 0.1.1 entry said Java and .NET weren't published, but they are (Maven dev.pydantic:* 0.1.1, NuGet Pydantic.OpAmp.* 0.1.1). Fixed, and added an Unreleased line for this PR.

  • Release checks (found by this PR's CI): native_dist.py check let the hosting package ship its assemblies alone, so the packed README failed it. The README its nuspec names is now allowed, and nothing else is (with a test). And the Registries PR dry run stamps 0.0.0, which npm 11 refuses to tag latest now that 0.1.1 is on npm, so every PR touching those paths would fail its npm job. The dry run now publishes under --tag dry-run (reproduced and checked with npm 11). A release still goes to latest.

  • Supervisor race (found by #109's CI, not this PR's code): Commander.Stop's kill-deadline goroutine read c.cmd after Stop could have returned, racing the Start that replaces it, and it could have signalled the new Collector. It now holds the process it was stopping. go test -race -run TestConnectionUpdateWithUnchangedCredentialsKeepsCollectorRunning failed within 300 runs before and passes 1000 after. The change is marked "Changed here" for the upstream fork.

The SDK code itself is unchanged. The registry READMEs only update with the next sdk/v* release.

Out of scope here (owned by #109 and #114, still open): on the published 0.1.1, configure_logfire() with the default console, and WithOpAmp() with AddConsoleExporter(), both answer the first redaction or log policy FAILED. An app that keeps its own TracerProvider or NodeSDK has no way to attach.


Generated by Claude Code