Client functions¶
JaegerClient talks to the Jaeger query service (port 16686) and is the entry point to the other
modules: query (Trace queries), initTracing (Tracing setup)
and remoteSampler / samplingStrategy (Remote sampling). Create one per process
and close it on shutdown: close() is idempotent and also shuts down every tracing handle and
remote sampler created through the client. The shared behaviour (timeouts, retries, hooks,
errors) is described in Client.
health¶
GET / on the query port (the stack catalog health target), without the token. With
healthUrl set (healthcheckv2, port 13133, /status), its answer is added to details with the
prefix healthcheck.; an unhealthy answer there gives healthy=false, status="degraded".
Never throws for an unhealthy or unreachable service (status="unreachable"), only for
CANCELLED and CONFIG.
ping¶
Authenticated round trip through the query API (GET /api/v3/services); returns the latency.
Raises AuthenticationError when an auth proxy rejects the token.
serverVersion / buildInfo¶
serverVersion() returns the version without the leading v (2.23.0): from
JAEGER_VERSION in the UI page (GET /), else from target_info{service_version=…} at
metricsUrl (port 8888). It raises UnsupportedError when neither source reports one; a 404 from
either source means "no version", not NotFoundError. buildInfo() returns the whole
JAEGER_VERSION object (gitVersion, gitCommit, buildDate) or null.
samplingStrategy¶
Fetches the remote sampling strategy of a service once: GET {samplingUrl}?service=<name>, with
the client's settings and token. A blank service raises ValidationError without a request. See
Remote sampling for the strategy model.
initTracing (client)¶
The same as the package-level initTracing, but a remote sampler started for
OTEL_TRACES_SAMPLER=jaeger_remote (or requested in code) uses the client's configuration
(samplingUrl, token, TLS), and close() shuts the handle down (flushing its spans).
remoteSampler¶
A started JaegerRemoteSampler for a service that uses the client's settings
(samplingUrl, timeouts, TLS, proxy, headers, token). close() stops it.
close¶
Idempotent. Shuts down the tracing handles (flushing their batch processors) and the samplers
created through the client, then releases connections. Later calls fail with CANCELLED
("<operation>: client is closed"); only Python's init_tracing and remote_sampler raise
CONFIG on a closed client.