Opentelemetry-specification: Rename SimpleSpanProcessor

Created on 22 Aug 2020  ·  6Comments  ·  Source: open-telemetry/opentelemetry-specification

Naming anything “simple” is both subjective and uninformative. I propose that we rename SimpleSpanProcessor on this basis.

Some ideas for a new name:

  • SpanProcessorStage
  • StreamingSpanProcessor
  • SameThreadSpanProcessor
  • CurrentThreadSpanProcessor
  • DirectSpanProcessor
  • CallingThreadSpanProcessor
  • SingleSpanProcessor

Criteria to consider:

  • Concurrency and resources
  • distinction of batch (single is the antonym to batch)

Perhaps we can vote on comments, including those that think renaming the class is a bad idea.

sdk after-ga trace

Most helpful comment

My preference is for SingleSpanProcessor

+1 on this name (if we decide to change it, as I personally don't _dislike_ SimpleSpanProcessor). My reason is the same as @huntc : to have its name describe it as a counter part to BatchSpanProcessor.

Also: maybe do the Exporter word inclusion (and discussion) in the name in a follow up?

All 6 comments

My preference is for SingleSpanProcessor being the antonym to BatchSpanProcessor. This is on the basis that the spec stipulates the class as being a stage where spans are passed through directly to an exporter sans context switching.

+1 to renaming. I like DirectSpanProcessor and SameThreadSpanProcessor, I've seen libraries with both patterns when referring to Executor so they seem pretty idiomatic.

I'd like another name: ImmediateSpanProcessor. Because it immediately sends each Span to the Exporter, which IMHO is it's main (sole?) advantage. And you could classify BatchSpanProcessor as a "deferred span processor".

I also intuitively like DirectSpanProcessor, but it might be a bit vague (what's an IndirectSpanProcessor?).

SingleSpanProcessor also has its merit but it sounds a bit like it would only process a single span (in total), so I'd prefer OneByOneSpanProcessor, if we go in that direction.

I don't understand the reasoning behind SpanProcessorStage or StreamingSpanProcessor.

I don't think SameThreadSpanProcessor is a good (cross-language) name. It should not matter for an exporter on which thread it is executed, unless we are talking about (non)blocking properties, but that's something you can't specify cross-language, thanks to Javascript where many things can only be done async. I have the same objections against CallingThreadSpanProcessor.

The spec does not contain SimpleSpanProcessor https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#built-in-span-processors.

If we do need to align on the class name, I think we need to have "Export" (or "Exporting") as part of the name since this processor is dedicated for exporting spans.

For example:

  • SingleExportSpanProcessor
  • BatchExportSpanProcessor

My preference is for SingleSpanProcessor

+1 on this name (if we decide to change it, as I personally don't _dislike_ SimpleSpanProcessor). My reason is the same as @huntc : to have its name describe it as a counter part to BatchSpanProcessor.

Also: maybe do the Exporter word inclusion (and discussion) in the name in a follow up?

Was this page helpful?
0 / 5 - 0 ratings