Skip to content

remove trace drivers' dependency on HttpTracerImpl - #16244

Merged
lizan merged 5 commits into
envoyproxy:mainfrom
wbpcode:tracer-deps
May 12, 2021
Merged

lizan merged 5 commits into
envoyproxy:mainfrom
wbpcode:tracer-deps

Conversation

@wbpcode

@wbpcode wbpcode commented Apr 30, 2021

Copy link
Copy Markdown
Member

Signed-off-by: wbpcode [email protected]

This PR is part of #16049 to support general tracing. Please check #16049 get more details.

Commit Message: remove trace drivers' dependency on HttpTracerImpl
Additional Description:

Now all tracers (zipkin, skywalking, etc.) will depend on HttpTracerImpl, making it difficult for Tracers to be reused by other protocols (Dubbo, Thrift, etc.). The purpose of this PR is to change this dependency.

Risk Level: Low (No new logic).
Testing: Add.
Docs Changes: N/A
Release Notes: N/A

@wbpcode

wbpcode commented Apr 30, 2021 •

Copy link
Copy Markdown
Member Author

Here is first sub PR. @lizan

There are some points my be can help reviewers:

  • This PR move Tracing::Driver, Tracing::Config, Tracing::Span etc to trace_driver.h as common interface for tracing.
  • This PR separates Tracing::NullSpanImpl and some common values from http_tracer_impl.h.
  • This PR upates interface of TracerFactory:
    From:
    virtual Tracing::HttpTracerSharedPtr createHttpTracer(const Protobuf::Message& config,
                                                          TracerFactoryContext& context) PURE;
    
    To:
    virtual Tracing::DriverSharedPtr createTracerDriver(const Protobuf::Message& config,
                                                        TracerFactoryContext& context) PURE;
    

@wbpcode
wbpcode requested a review from alyssawilk as a code owner April 30, 2021 03:42
class TracingTagValues {
public:
// OpenTracing standard tag names.
const std::string Component = "component";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure if we can make all of these as constexpr. WDYT?

@wbpcode wbpcode May 6, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@dio These values are separated from http_tracer_impl.h derectly and no any change. I prefer to add a TODO, and then complete the const to constexpr migration in a new PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sgtm

@wbpcode

wbpcode commented May 8, 2021

Copy link
Copy Markdown
Member Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16244 (comment) was created by @wbpcode.

see: more, trace.

@wbpcode

wbpcode commented May 11, 2021

Copy link
Copy Markdown
Member Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16244 (comment) was created by @wbpcode.

see: more, trace.

@wbpcode

wbpcode commented May 11, 2021

Copy link
Copy Markdown
Member Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #16244 (comment) was created by @wbpcode.

see: more, trace.

class TracingTagValues {
public:
// OpenTracing standard tag names.
const std::string Component = "component";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sgtm

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