Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Splitting out the jaxrs2 filters #273

Merged
merged 3 commits into from
Oct 18, 2017

Conversation

dray92
Copy link
Contributor

@dray92 dray92 commented Oct 18, 2017

Signed-off-by: Debosmit Ray [email protected]

@codecov
Copy link

codecov bot commented Oct 18, 2017

Codecov Report

Merging #273 into master will increase coverage by 0.17%.
The diff coverage is 92.1%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #273      +/-   ##
===========================================
+ Coverage     82.33%   82.5%   +0.17%     
- Complexity      535     542       +7     
===========================================
  Files            87      89       +2     
  Lines          2021    2041      +20     
  Branches        237     237              
===========================================
+ Hits           1664    1684      +20     
  Misses          259     259              
  Partials         98      98
Impacted Files Coverage Δ Complexity Δ
...aeger/filters/jaxrs2/ClientSpanCreationFilter.java 100% <100%> (ø) 4 <4> (?)
...a/com/uber/jaeger/filters/jaxrs2/ClientFilter.java 86.66% <100%> (+4.52%) 4 <2> (-1) ⬇️
...eger/filters/jaxrs2/ClientSpanInjectionFilter.java 83.33% <83.33%> (ø) 4 <4> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bcd32cb...2401db3. Read the comment docs.

@@ -36,30 +33,22 @@
private final Tracer tracer;
private final TraceContext traceContext;

private final ClientSpanCreationFilter spanCreationFilter;
private final ClientSpanInjectionFilter spaninjectionFilter;
Copy link
Contributor

Choose a reason for hiding this comment

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

s/spaninjectionFilter/spanInjectionFilter

public ClientFilter(Tracer tracer, TraceContext traceContext) {
this.tracer = tracer;
this.traceContext = traceContext;

this.spanCreationFilter = new ClientSpanCreationFilter(tracer, traceContext);
this.spaninjectionFilter = new ClientSpanInjectionFilter(tracer, traceContext);
}

@Override
public void filter(ClientRequestContext clientRequestContext) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just so I follow, for your use case, you'll extend the ClientFilter and then override this filter function to add your baggage between the spanCreationFilter and spanInjectionFilter?

What do we do in the future when other people want to add extra functionality? Will they add their functionality into your filter?

Copy link
Member

Choose a reason for hiding this comment

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

then someone can add a CompositeFilter

Copy link
Contributor

Choose a reason for hiding this comment

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

right, so is that the plan?

Copy link
Member

Choose a reason for hiding this comment

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

there's no plan - it's not a problem today, and it's solvable in the future with composite filter, so we don't need to over-engineer today for non-existing need

@black-adder
Copy link
Contributor

every commit has to be signed off, you can squash your commits under one with the sign off

@ghost ghost assigned black-adder Oct 18, 2017
@ghost ghost added the review label Oct 18, 2017
@black-adder black-adder merged commit 8816aa5 into jaegertracing:master Oct 18, 2017
@ghost ghost removed the review label Oct 18, 2017
dray92 added a commit to dray92/jaeger-client-java that referenced this pull request Oct 20, 2017
@Provider
@ConstrainedTo(RuntimeType.CLIENT)
@Slf4j
public class ClientSpanCreationFilter implements ClientRequestFilter {

Choose a reason for hiding this comment

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

I don't think that we should be releasing OSS without proper Javadocs.

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

Successfully merging this pull request may close these issues.

5 participants