Jaeger: Replicate /sampling endpoint from agent in the collector

Created on 10 Dec 2019  路  9Comments  路  Source: jaegertracing/jaeger

Requirement - what kind of business use case are you trying to solve?

When using HTTP reporters in the clients to export tracing data directly to the collectors, users still want to be able to use remote sampler that loads centrally managed sampling strategies.

Problem - what in Jaeger blocks you from solving the requirement?

The /sampling endpoint is only implemented in the agent today.

Proposal - what do you suggest to solve the problem or improve the existing situation?

Expose the same endpoint from the collectors, e.g. /api/sampling.

new-feature good first issue help wanted

All 9 comments

When this is done, update FAQ docs, cf. https://github.com/jaegertracing/documentation/pull/335

Hi
If this is still open, I can take it up.

It's yours.

Hi @namratachaudhary I have already submitted a PR for this issue.

Open question: can clients be configured with a different sampling URL?

Clients support the following config options:

  • JAEGER_ENDPOINT, e.g. http(s)://collector:port/api/traces
  • JAEGER_SAMPLER_MANAGER_HOST_PORT - name implies no path is allowed

Possible solutions:

  • We could introduce JAEGER_SAMPLING_ENDPOINT, but that still leaves out other configurations like baggage restrictions.
  • We could introduce JAEGER_CONFIG_ENDPOINT, but that wouldn't be a real endpoint, but a base address, with /sampling or /baggage path added by the client as needed.
  • We could introduce JAEGER_API (or something along these lines) that will be the base address, e.g. http(s)://collector:port/api used by both span reporter (by adding /traces) and sampler (by adding /sampling).

Q: is it better to hardcode the final segments of the URL in the clients or make them configurable? Strictly speaking the URL path is part of the contract, e.g. if we introduce a different format of the sampling output it should become /api/v2/sampling or something like that.

cc @jpkrohling @pavolloffay @objectiser

Q: is it better to hardcode the final segments of the URL in the clients or make them configurable?

I would lean towards the consistency and require configuring the full URL. It's more flexible and one could deploy it on different path.

@pavolloffay so you'd vote for JAEGER_SAMPLING_ENDPOINT?

This is done.

Was this page helpful?
0 / 5 - 0 ratings