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

Pass a wrapper instead of opentracing.Tracer to ease migration to OTEL in the future [part 1] #4529

Merged

Conversation

sbin64
Copy link
Contributor

@sbin64 sbin64 commented Jun 13, 2023

Which problem is this PR solving?

Part of #3381

Short description of the changes

  • This refactors the code by introducing a new wrapper object JTracer to wrap that interface

@sbin64 sbin64 requested a review from a team as a code owner June 13, 2023 17:22
@sbin64 sbin64 requested a review from albertteoh June 13, 2023 17:22
@afzal442 afzal442 force-pushed the refactor-opentracing-tracer branch from c3cd998 to baa4d94 Compare June 13, 2023 17:23
cmd/all-in-one/main.go Outdated Show resolved Hide resolved
cmd/query/main.go Outdated Show resolved Hide resolved
pkg/jtacer/jtracer.go Outdated Show resolved Hide resolved
pkg/jtacer/jtracer.go Outdated Show resolved Hide resolved
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.

overall looks reasonable, needs some cleanup. Next step would be passing the new struct deeper into components, to the point where it is actually used.

@sbin64 sbin64 force-pushed the refactor-opentracing-tracer branch from baa4d94 to b9afacc Compare June 13, 2023 18:37
@afzal442 afzal442 force-pushed the refactor-opentracing-tracer branch from b9afacc to 95c6ccc Compare June 13, 2023 18:41
@sbin64 sbin64 changed the title Refactor opentracing.Tracer interface [WIP] Refactor opentracing.Tracer interface Jun 13, 2023
cmd/all-in-one/main.go Outdated Show resolved Hide resolved
cmd/query/app/server.go Outdated Show resolved Hide resolved
cmd/query/main.go Outdated Show resolved Hide resolved
@afzal442 afzal442 force-pushed the refactor-opentracing-tracer branch 2 times, most recently from c27c6df to f21068e Compare June 14, 2023 08:07
cmd/query/app/server_test.go Outdated Show resolved Hide resolved
pkg/jtracer/jtracer.go Show resolved Hide resolved
pkg/jtracer/jtracer.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 14, 2023

Codecov Report

Patch coverage: 84.61% and project coverage change: -0.03 ⚠️

Comparison is base (c582d89) 97.08% compared to head (8420480) 97.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4529      +/-   ##
==========================================
- Coverage   97.08%   97.05%   -0.03%     
==========================================
  Files         300      301       +1     
  Lines       17813    17817       +4     
==========================================
- Hits        17293    17292       -1     
- Misses        417      421       +4     
- Partials      103      104       +1     
Flag Coverage Δ
unittests 97.05% <84.61%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/jtracer/jtracer.go 50.00% <50.00%> (ø)
cmd/query/app/grpc_handler.go 98.78% <100.00%> (ø)
cmd/query/app/handler_options.go 100.00% <100.00%> (ø)
cmd/query/app/http_handler.go 100.00% <100.00%> (ø)
cmd/query/app/server.go 94.57% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@afzal442 afzal442 force-pushed the refactor-opentracing-tracer branch 2 times, most recently from 68fbd4b to 47b98e0 Compare June 14, 2023 18:17
yurishkuro
yurishkuro previously approved these changes Jun 14, 2023
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, a couple minor cleanups and we should merge this.

cmd/query/app/grpc_handler.go Outdated Show resolved Hide resolved
cmd/query/app/grpc_handler_test.go Outdated Show resolved Hide resolved
Signed-off-by: afzal442 <afzal442@gmail.com>
@yurishkuro yurishkuro changed the title [WIP] Refactor opentracing.Tracer interface Pass a wrapper instead of opentracing.Tracer to easy migration to OTEL in the future [part 1] Jun 14, 2023
@yurishkuro yurishkuro changed the title Pass a wrapper instead of opentracing.Tracer to easy migration to OTEL in the future [part 1] Pass a wrapper instead of opentracing.Tracer to ease migration to OTEL in the future [part 1] Jun 14, 2023
@yurishkuro yurishkuro merged commit bfed6e7 into jaegertracing:main Jun 14, 2023
@sbin64 sbin64 deleted the refactor-opentracing-tracer branch June 15, 2023 06:09
kjschnei001 pushed a commit to kjschnei001/jaeger that referenced this pull request Jun 29, 2023
…TEL in the future [part 1] (jaegertracing#4529)

## Which problem is this PR solving?
Part of jaegertracing#3381

## Short description of the changes
- This refactors the code by introducing a new wrapper object `JTracer`
to wrap that interface

Signed-off-by: afzal442 <afzal442@gmail.com>
Signed-off-by: KevinSchneider <kevin.schneider@target.com>
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.

3 participants