Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

implement "b3 single" header format #21

Closed
codefromthecrypt opened this issue Aug 29, 2018 · 1 comment
Closed

implement "b3 single" header format #21

codefromthecrypt opened this issue Aug 29, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@codefromthecrypt
Copy link

As discussed on openzipkin/b3-propagation#21 and first implemented here: https://github.com/openzipkin/brave/blob/master/brave/src/main/java/brave/propagation/B3SingleFormat.java https://github.com/openzipkin/brave/blob/master/brave/src/test/java/brave/propagation/B3SingleFormatTest.java

Let's support at least reading "b3" header from a single string, most commonly traceid-spanid-1
It would also be nice to support optionally writing this, especially in message providers or others with constrained environments.

Brave currently has a property like this, but its name could change with feedback:

    /**
     * When true, only writes a single {@link B3SingleFormat b3 header} for outbound propagation.
     *
     * <p>Use this to reduce overhead. Note: normal {@link Tracing#propagation()} is used to parse
     * incoming headers. The implementation must be able to read "b3" headers.
     */
    public Builder b3SingleFormat(boolean b3SingleFormat) {
      this.b3SingleFormat = b3SingleFormat;
      return this;
}
@kikito
Copy link
Member

kikito commented Feb 7, 2020

Hi, I gave b3 single header implementation a try in #66

@kikito kikito closed this as completed Feb 7, 2020
@kikito kikito reopened this Feb 7, 2020
kikito added a commit that referenced this issue Feb 11, 2020
kikito added a commit that referenced this issue Feb 11, 2020
kikito added a commit that referenced this issue Feb 13, 2020
Implements #21

* refactor(handler) extract parse_http_req_headers to module

* feat(handler) parse b3 single header

* tests(zipkin_spec) extract wait_for_spans to aux function
@kikito kikito closed this as completed Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants