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

Remove deprecated APIs #414

Merged
merged 4 commits into from
May 23, 2018

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented May 16, 2018

Resolves #395 #413

I didn't remove Tracer.Builder(name, reporter, samper) #413 I did in the second commit

Related PRs which removed usage of deprecated APIs from internal code

Signed-off-by: Pavol Loffay ploffay@redhat.com

@ghost ghost assigned pavolloffay May 16, 2018
@ghost ghost added the review label May 16, 2018
@pavolloffay pavolloffay requested review from yurishkuro, vprithvi and jpkrohling and removed request for yurishkuro and vprithvi May 16, 2018 10:30
@codecov
Copy link

codecov bot commented May 16, 2018

Codecov Report

Merging #414 into master will increase coverage by 4.61%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #414      +/-   ##
============================================
+ Coverage      82.8%   87.41%   +4.61%     
  Complexity      512      512              
============================================
  Files            69       66       -3     
  Lines          2105     1955     -150     
  Branches        263      258       -5     
============================================
- Hits           1743     1709      -34     
+ Misses          273      156     -117     
- Partials         89       90       +1
Impacted Files Coverage Δ Complexity Δ
.../src/main/java/io/jaegertracing/Configuration.java 90.65% <ø> (+9.08%) 37 <0> (ø) ⬇️
...main/java/io/jaegertracing/senders/HttpSender.java 92.72% <ø> (+11.77%) 6 <0> (ø) ⬇️
...er-core/src/main/java/io/jaegertracing/Tracer.java 87.19% <ø> (+2.1%) 23 <0> (ø) ⬇️
...aegertracing/samplers/RemoteControlledSampler.java 89.53% <ø> (+10.15%) 17 <0> (ø) ⬇️
...rc/main/java/io/jaegertracing/metrics/Metrics.java 78.57% <ø> (+6.83%) 11 <0> (ø) ⬇️
...re/src/main/java/io/jaegertracing/SpanContext.java 88.37% <ø> (+5.76%) 25 <0> (ø) ⬇️
...ava/io/jaegertracing/reporters/RemoteReporter.java 87.65% <ø> (+4.52%) 7 <0> (ø) ⬇️
...in/java/io/jaegertracing/senders/ThriftSender.java 79.06% <0%> (+4.65%) 10% <0%> (ø) ⬇️

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 07df0b8...6ad09bd. Read the comment docs.

Copy link
Collaborator

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

LGTM, but something sounds odd... Are there only two tests affected by this change? O_O

@pavolloffay
Copy link
Member Author

Are there only two tests affected by this change? O_O

Internal use of deprecated API has been removed in previous PRs - just to keep this clean

@pavolloffay pavolloffay force-pushed the remove-deprecated-api-2 branch 2 times, most recently from 4d8fb5a to a9d5560 Compare May 16, 2018 12:54
@jpkrohling
Copy link
Collaborator

just to keep this clean

Ok, I personally would have preferred to keep this here, so that the actual effects of this PR could be easily measured.

@pavolloffay
Copy link
Member Author

@yurishkuro could you please have a look?

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay pavolloffay force-pushed the remove-deprecated-api-2 branch from 60a3e8f to 6ad09bd Compare May 22, 2018 10:45
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

lgtm

public RemoteReporter(Sender sender, int flushInterval, int maxQueueSize, Metrics metrics) {
this(sender, flushInterval, maxQueueSize, DEFAULT_CLOSE_ENQUEUE_TIMEOUT_MILLIS, metrics);
}

RemoteReporter(Sender sender, int flushInterval, int maxQueueSize, int closeEnqueueTimeout,
Copy link
Member

Choose a reason for hiding this comment

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

should we remove this ctor as well? Having public ctors is what leads to proliferation of deprecated methods in the first place, it's better to use builder pattern for most core components. Builder can be overkill for smaller classes, but RemoteReporter is a critical component that can continue evolving.

E.g. I see that we already use builder for RemoteSampler.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is package private, so not exposed to the world.

I can make it private in this PR.

@@ -43,47 +43,12 @@
* http://localhost:14268/api/traces
*
* Uses the default {@link okhttp3.OkHttpClient} which uses {@link okhttp3.ConnectionPool#ConnectionPool()}.
* Use {@link HttpSender#HttpSender(java.lang.String, int, okhttp3.OkHttpClient)} to adjust parameters.
* Use {@link HttpSender.Builder} if you need to add more parameters
*/
public HttpSender(String endpoint) {
Copy link
Member

Choose a reason for hiding this comment

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

any reason to keep this ctor?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really, It would be better to remove it to make the API more consistent. We can do 0.28.0 with more deprecations ASAP, then remove it

@pavolloffay
Copy link
Member Author

@yurishkuro I will merge this and address other comments in a separate PR as it's not related to removing deprecated APIs.

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.

3 participants