Skip to content

remove trace drivers' dependency on HttpTracerImpl#16244

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

remove trace drivers' dependency on HttpTracerImpl#16244
lizan merged 5 commits intoenvoyproxy:mainfrom
wbpcode:tracer-deps

Conversation

@wbpcode
Copy link
Copy Markdown
Member

@wbpcode wbpcode commented Apr 30, 2021

Signed-off-by: wbpcode comems@msn.com

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

Signed-off-by: wbpcode <comems@msn.com>
@wbpcode
Copy link
Copy Markdown
Member Author

wbpcode commented Apr 30, 2021

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
Signed-off-by: wbpcode <comems@msn.com>
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?

Copy link
Copy Markdown
Member Author

@wbpcode wbpcode May 6, 2021

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
Copy link
Copy Markdown
Member Author

wbpcode commented May 8, 2021

/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
Copy link
Copy Markdown
Member Author

wbpcode commented May 11, 2021

/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
Copy link
Copy Markdown
Member Author

wbpcode commented May 11, 2021

/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