Skip to content

Add endpoint_wait span in activator - #3881

Merged
knative-prow-robot merged 1 commit into
knative:masterfrom
greghaynes:endpoint-waiting-span
Jun 3, 2019
Merged

knative-prow-robot merged 1 commit into
knative:masterfrom
greghaynes:endpoint-waiting-span

Conversation

@greghaynes

Copy link
Copy Markdown
Contributor

This span clearly shows time spent waiting for our endpoint to become
ready

NONE

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 24, 2019
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 24, 2019

@vagababov vagababov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for doing this.
Can we also log the time in the log file?

@greghaynes greghaynes mentioned this pull request Apr 24, 2019
@greghaynes
greghaynes force-pushed the endpoint-waiting-span branch from caa94bd to df7ef48 Compare April 25, 2019 22:58
@knative-prow-robot knative-prow-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 25, 2019

@markusthoemmes markusthoemmes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a good way to test these spans? I fear that they can get broken/lost too easily if we're not enforcing they're there.

@greghaynes
greghaynes force-pushed the endpoint-waiting-span branch from df7ef48 to 919e0e1 Compare May 14, 2019 20:30
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 14, 2019

@vagababov vagababov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LG, just nits.

Comment thread pkg/activator/handler/handler_test.go Resolved
Comment thread pkg/activator/handler/handler_test.go Resolved
@greghaynes
greghaynes force-pushed the endpoint-waiting-span branch from 919e0e1 to 80418e3 Compare May 14, 2019 23:31
@greghaynes

Copy link
Copy Markdown
Contributor Author

/hold

This depends on #4097

@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 May 14, 2019

@vagababov vagababov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 15, 2019
@greghaynes
greghaynes force-pushed the endpoint-waiting-span branch from 80418e3 to f378c6d Compare May 15, 2019 06:05
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 15, 2019
@greghaynes

Copy link
Copy Markdown
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 May 15, 2019
Comment thread pkg/activator/handler/handler.go Outdated
epWaitStart := time.Now()
epWaitEnd := func() {
epWaitSpan.End()
a.logger.Infof("Waiting for endpoint took %v time", time.Since(epWaitStart))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we only log this in the successful case? In the error case we don't know if we even waited for endpoints to appear so this could be confusing in the logs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also: This isn't really only waiting for endpoints but also waiting for capacity to be available in general. Should this rather be capacity_wait?

On a broader scheme: Should we propagate context into Try to be able to distinguish better?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree with the logs + rename. Right now we could propogate ctx in to try but I am hoping to decouple probing from individual requests so that'll end up getting removed anyways.

@greghaynes
greghaynes force-pushed the endpoint-waiting-span branch from f378c6d to dd1367e Compare May 15, 2019 15:36
@greghaynes
greghaynes force-pushed the endpoint-waiting-span branch 2 times, most recently from a301826 to 006cd4e Compare May 15, 2019 17:04
Comment thread pkg/activator/handler/handler.go Resolved
This span clearly shows time spent waiting for our endpoint to become
ready
@greghaynes
greghaynes force-pushed the endpoint-waiting-span branch from 006cd4e to 4bbc78c Compare May 15, 2019 23:18
@markusthoemmes

Copy link
Copy Markdown
Contributor

@greghaynes is this ready to go in?

@greghaynes

Copy link
Copy Markdown
Contributor Author

@markusthoemmes Yep I believe so

@markusthoemmes markusthoemmes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2019
@knative-prow-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: greghaynes, markusthoemmes, vagababov

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

The pull request process is described here

Details 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 merged commit 23b5cb5 into knative:master Jun 3, 2019
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/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants