Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Revisiting naming #23

Closed
Closed
@ktoso

Description

@ktoso

We should revisit naming again before calling it final.

Considerations:

Baggage header is used to propagate properties not defined in Trace-Parent. There are two common use cases. First is to define a context on trace initiation. Such context will have customer's identity, high-level operation name and other properties like a flight name. Second use case is to pass the caller's name to the next component. This name-value pair will be overridden by every service to it's own name.

  • Baggage is nice and short

  • There is a confusion in the community about context vs baggage and the current explanation: https://github.com/slashmo/gsoc-swift-baggage-context#context-passing-guidelines was either not read, or internalized by the community

    • Libraries should always have a context function parameter
    • realistically, the context should be a carrier, to make composition more painless
    • to avoid context.context, today, we call it baggage when inside of a carrier -- a Baggage(Context)Carrier; this confuses people and they keep calling it "just baggage" which isn't wrong per se, but makes the passing around inconsistent
  • BaggageContext is known and popularized in tracing literature, including https://www.shkuro.com/books/2019-mastering-distributed-tracing various discussions online (zipkin repos etc), and of course the TracingPlane paper https://dl.acm.org/doi/10.1145/3190508.3190526

    • the name was coined in Universal context propagation for distributed system instrumentation however there it is a very specific thing, tied to the opaque binary representation etc.
    • it really relates closest to what we'd like to pull off long term, but it is not what we have today
  • We could consider naming the type Baggage and always call it as such.

    • Just baggage is a known term in tracing, e.g. jaeger https://www.jaegertracing.io/docs/1.18/client-libraries/#baggage
    • where it is a bag of stuff; so that matches, and also exposed through a span (also matches, though ours is immutable on a span today... maybe it will have to become not immutable on a span?)
    • That means carrier types can become LoggerCarrier BaggageCarrier etc.
    • The library could become BaggageContext
    • Carriers are always adopted by a ...Context
    • the "Default carrier" struct we'd need to ship could become BaggageContextCarrier and implement LoggerCarrier, BaggageCarrier because that's the most commonly required type.
      • i remain worried about the event loop in here too, it makes composition harder right away and library composition and stuff...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions