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

E2E Tracing test - Strong trace assertions #1972

Merged
merged 11 commits into from
Sep 30, 2019

Conversation

Harwayne
Copy link
Contributor

@Harwayne Harwayne commented Sep 27, 2019

Helps with #1765
Fixes #1951

Proposed Changes

  • Event{Receiver,Dispatcher} pass the tracing information via the traceparent attribute.
  • Add TestChannelTracingWIthReply E2E test.
  • Assert that the Trace trees look similar, rather than just a flat number of Spans.
    • This will fail for any Channel implementations that generate spans inside themselves. We will address that in a future PR.

Release Note

NONE

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 27, 2019
@knative-prow-robot knative-prow-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 27, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Harwayne

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release labels Sep 27, 2019
@Harwayne
Copy link
Contributor Author

/hold

I am monkey patching vendored code, I need to do that properly before submission.

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2019
@adrcunha adrcunha requested review from chizhg and removed request for adrcunha September 27, 2019 22:09
@@ -261,6 +261,11 @@ func startSpanInternal(name string, hasParent bool, parent SpanContext, remotePa
return span
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove trailing whitespace:

Suggested change

@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/broker/filter/filter_handler.go 81.3% 81.8% 0.4
pkg/broker/ingress/ingress_handler.go 63.3% 58.0% -5.3
pkg/channel/event_dispatcher.go 82.6% 85.4% 2.8
pkg/channel/event_receiver.go 64.2% 64.8% 0.7
pkg/tracing/traceparent.go Do not exist 91.2%

@Harwayne
Copy link
Contributor Author

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2019
--- a/vendor/go.opencensus.io/trace/trace.go
+++ b/vendor/go.opencensus.io/trace/trace.go
@@ -261,6 +261,11 @@ func startSpanInternal(name string, hasParent bool, parent SpanContext, remotePa
return span
Copy link
Member

Choose a reason for hiding this comment

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

is that until some update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. I just couldn't find a better way to do it. There probably is one, but I wasn't able to find it.

In theory, we will move to some OpenTelemetry libraries when they go 1.0, at which point I hope we don't need a similar hack :)

@@ -33,3 +33,9 @@ rm -rf $(find vendor/ -name 'BUILD.bazel')
update_licenses third_party/VENDOR-LICENSE \
$(find . -name "*.go" | grep -v vendor | xargs grep "package main" | cut -d: -f1 | xargs -n1 dirname | uniq)

# HACK HACK HACK
Copy link
Member

Choose a reason for hiding this comment

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

:-)

"go.uber.org/zap"
"knative.dev/eventing/pkg/broker"
"knative.dev/eventing/pkg/tracing"
Copy link
Member

Choose a reason for hiding this comment

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

pkgtracing ? (to be consistent)

Copy link
Member

Choose a reason for hiding this comment

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

nevermind :-)

I see eventing (I feel eventingtracing is odd)

Copy link
Member

Choose a reason for hiding this comment

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

/resolved

@matzew
Copy link
Member

matzew commented Sep 30, 2019

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove extra tracing span
6 participants