Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Span names shouldn't be prefixed with Sent and Recv #616

Merged
merged 1 commit into from
Mar 21, 2018

Conversation

rakyll
Copy link
Contributor

@rakyll rakyll commented Mar 20, 2018

Instead set them for some exporters that cannot
differentiate client spans from server spans in their model.

Fixes #607.

Copy link
Member

@odeke-em odeke-em left a comment

Choose a reason for hiding this comment

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

Cool, thanks @rakyll! I just had one open ended question about the new spanNameFromURL using just the url.Path

}
return prefix + "." + host + port + u.Path
func spanNameFromURL(u *url.URL) string {
return u.Path
Copy link
Member

Choose a reason for hiding this comment

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

Will the path be sufficient here?

Requests from "localhost:443/foo", "opencensus.io:8888/foo", "opencensus.io/foo", "ultima.te:9999/foo" will all have the same span name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Users should always breakdown by host. Unlike RPC, there is no concept of a service name in HTTP URLs. The hostname might differ even if the service is the same.

Instead set them for some exporters that cannot
differentiate client spans from server spans in their model.

Fixes census-instrumentation#607.
@rakyll
Copy link
Contributor Author

rakyll commented Mar 21, 2018

PTAL

@rakyll rakyll merged commit b8f3b91 into census-instrumentation:master Mar 21, 2018
@rakyll rakyll deleted the httpspec branch March 21, 2018 18:18
@rakyll rakyll mentioned this pull request Mar 29, 2018
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.

3 participants