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

Remove Thrift headers from Jaeger public headers #172

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

BeDeBaMu
Copy link
Contributor

Signed-off-by: Benoit De Backer [email protected]

Adresses jaegertracing#121
so that thrift is a private dependency of jaeger.

Signed-off-by: Benoit De Backer <[email protected]>
@AppVeyorBot
Copy link

@yurishkuro
Copy link
Member

@mdouaihy could you review this?

@BeDeBaMu
Copy link
Contributor Author

Hi,

It’s a minimal fix that should solve the primary concern.
However, to reduce the number of exported headers (nearly 100) I’d rather add some new changes:

  1. Adapt some code to avoid exposing implementation details
    a. Samplers
    b. Metrics
    c. [optional] utils/YAML.h
  2. change the code layout a little bit [To be discussed, there may be constraints I am not aware of]
    a. Move the public headers under one directory include/ (keep private ones under src)
  3. Modify CMakeLists in order to
    a. export only public headers,
    b. use PRIVATE for lib when applicable
    c. [bonus] improve project visualization in IDEs
  4. Abstract thrift and remove it from Span, Tag, LogRecord, etc.

Benefits expected:

  • from 1. & 3.a much less header exports
  • from 2. easier CMakeLists code to export public headers, easier public include visibility
  • from 3.b easier linkage with jaeger-client-cpp
  • from 4 easier switch to another serializer (protobuf)

Do you have any particular concerns regarding these proposals?
I will insert issues later so that we can discuss them.

Copy link
Contributor

@mdouaihy mdouaihy left a comment

Choose a reason for hiding this comment

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

@BeDeBaMu, with your change, we no longer have the thrift includes in the public headers.

However, you had to forward declare some classes as the thrift transformation is accessible through methods of the public classes.

@yurishkuro I think that the change is ok but we need to continue the work to remove any reference to thrift completely from any public object (header, classed) as suggested.

@mdouaihy
Copy link
Contributor

Hi @yurishkuro, I just want you to know that @BeDeBaMu and I are from the same organisation. Before I validate, I want to check that it's not a problem for you.

@BeDeBaMu
Copy link
Contributor Author

BeDeBaMu commented Sep 17, 2019

@yurishkuro I think that the change is ok but we need to continue the work to remove any reference to thrift completely from any public object (header, classed) as suggested.

@mdouaihy this is the purpose of my 4th item

@yurishkuro
Copy link
Member

@mdouaihy
Copy link
Contributor

I just tested manually and it's working.

However; I noticed that the build-plugin script needs to be updated to build a version linking statically it's dependencies. I ll add an issue for that.

@yurishkuro
Copy link
Member

does this resolve #121 ?

@yurishkuro yurishkuro merged commit 11bbde1 into jaegertracing:master Sep 25, 2019
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.

4 participants