docs: document resource detectors and Sentry profiling on free-threaded CPython - #275
Merged
Merged
Conversation
…ed CPython Closes #181.
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.
Closes #181. Docs plus pinning tests; no change under
lite_bootstrap/.Resource detectors
New
### Resourcesubsection under OpenTelemetry.OpenTelemetryInstrumentbuilds its resource withResource.create, soOTEL_EXPERIMENTAL_RESOURCE_DETECTORSandOTEL_RESOURCE_ATTRIBUTESalready work. The configured attributes merge last.The issue said lite-bootstrap's
service_nameoverridesOTEL_SERVICE_NAME. It's stronger than that:service_namedefaults to"micro-service", soOTEL_SERVICE_NAMEis overridden unlessservice_nameis empty. The docs say so.The example lists detectors explicitly and doesn't mention
*. The wildcard doesn't exist inopentelemetry-sdk1.28, our floor. I checked 1.28'sResource.create:process,osandhostare registered there, and explicit attributes still merge last.New tests in
tests/instruments/test_opentelemetry_instrument.py:test_opentelemetry_configured_service_name_wins_over_envpinsservice.namewithOTEL_SERVICE_NAMEset, for three configs: the default,service_name, andopentelemetry_service_name.test_opentelemetry_resource_detectors_enrich_resourcechecks that theprocessdetector andOTEL_RESOURCE_ATTRIBUTESboth reach the resource.Profiling on free-threaded CPython
The Pyroscope section now says the extra can't install on free-threaded CPython (#171) and points to Sentry continuous profiling through
sentry_additional_params.The brief required this to be checked before it was documented. I ran it on CPython 3.14.7t, GIL disabled, with sentry-sdk 2.71.0 installed via
lite-bootstrap[sentry]:FreeBootstrapperwithprofile_session_sample_rate=1.0andprofile_lifecycle="manual", thenstart_profiler(), 1.5 s of CPU work on 5 threads, andstop_profiler().Transportreceived oneprofile_chunkenvelope with 777 samples across 6 thread ids.sys._is_gil_enabled()was stillFalseafterwards, and nothing warned under-X dev.Only the
manuallifecycle was exercised, so that's the one the docs example uses.Checks
just lint-ci,just test-ci(340 passed, 100% coverage),just docs-build(strict), andjust adr-checkall pass.