Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds EntrySplitter for use in w3c specs and secondary-sampling #1193

Merged
merged 13 commits into from
May 8, 2020

Conversation

codefromthecrypt
Copy link
Member

This adds EntrySplitter to help handle complex formats such as W3C
trace-context efficiently. For example, this has flexible whitespace
rules to comply with standards like 'tracestate' which require retaining
leading whitespace.

See #693

This adds `EntrySplitter` to help handle complex formats such as W3C
trace-context efficiently. For example, this has flexible whitespace
rules to comply with standards like 'tracestate' which require retaining
leading whitespace.

See #693
@codefromthecrypt codefromthecrypt requested a review from anuraaga May 7, 2020 06:35
}
target.put(key, attributes);
return true;
}, keyToAttributes, "authcache;ttl=1;spanId=19f84f102048e047,gateway");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@narayaruna look familiar? :)

* This is an example of how to parse without allocating strings. This is based on
* https://github.com/openzipkin/zipkin-aws/blob/master/brave-propagation-aws/src/main/java/brave/propagation/aws/AWSPropagation.java
*/
@Test public void example_parseAWSTraceId() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added allocation free trace ID example from AWS

Adrian Cole added 2 commits May 8, 2020 12:38
@codefromthecrypt
Copy link
Member Author

Thanks for the look @anuraaga PTAL

@codefromthecrypt
Copy link
Member Author

@samukce I now realize we don't have rationale for our coding conventions including things you just asked.. I'll add it so it is easier to link to later.

We only lightly say a few things here https://github.com/openzipkin/brave/blob/master/HACKING.md but there have been issues in the past particularly about bytecode size. If you aren't careful the jar can grow really big as it is more often people add code without removing code.

here are a few related changes which help control size and stay dep free:
#730
#1159
openzipkin/zipkin#1236
openzipkin/zipkin#2062

@@ -18,10 +18,50 @@ thought as it would betray productivity and make this document unreadable.
Rationale here should be limited to impactful designs, and aspects non-obvious,
non-conventional or subtle.

## Public namespace
## Java conventions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

brave/RATIONALE.md Outdated Show resolved Hide resolved
@codefromthecrypt codefromthecrypt merged commit 169d93a into master May 8, 2020
@codefromthecrypt codefromthecrypt deleted the entry-splitter branch May 8, 2020 07:21
@codefromthecrypt
Copy link
Member Author

Thanks for the help @anuraaga and @samukce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants