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

Distinguish between physical and logical operations #110

Open
danielkhan opened this issue Jun 12, 2019 · 9 comments
Open

Distinguish between physical and logical operations #110

danielkhan opened this issue Jun 12, 2019 · 9 comments
Labels
area:semantic-conventions Related to semantic conventions release:after-ga Not required before GA release, and not going to work on before GA
Milestone

Comments

@danielkhan
Copy link
Contributor

It'll be helpful to clarify whether this is a physical operation or logical one. My suggestion: only mark SpanKind = Client for the actual physical operation, for logical operation use SpanKind = Internal.

For example, the user would have requests.get('https://www.wikipedia.org/wiki/Rabbit'), which results in two physical HTTP requests - one 301 redirection, another 200 okay. The expected result is:

Span(SpanKind = Internal, http.status_code = 200, ...)
    Span(SpanKind = Client, http.status_code = 301, ...)
    Span(SpanKind = Client, http.status_code = 200, ...)

Please refer to census-instrumentation/opencensus-python#627 for more background.

Originally posted by @reyang in #82

@SergeyKanzhelev SergeyKanzhelev added this to the API revision: 07-2019 milestone Jun 20, 2019
@iredelmeier iredelmeier added the area:semantic-conventions Related to semantic conventions label Jul 30, 2019
@untitaker
Copy link

untitaker commented Sep 27, 2019

My issue is that at the moment there exists no httplib instrumentation in Python, so by applying this sort of rule you would effectively remove all Client spans. Even if we had one, requests' default adapter can be swapped out for something that is not instrumented. Based on that I don't believe that sdks should choose the spankind based on whether they expect there to be child spans (created by a not necessarily related instrumentation).

(EDIT: I just realized I assumed the physical spans to come from a different instrumentation)

By the same argument I could also say that the httplib span should be marked as Internal as the only true physical operation is the socket write.

IMO it would make sense to have a freeform field to specify which exact instrumentation created this span (with the possible values "python-requests" and "python-httplib" in @danielkhan's example). This should clear the confusion and also serve as a string to search for if the user has to dive into code to understand why a span was created in the first place

@Oberon00
Copy link
Member

which exact instrumentation created this span

You will be pleased to find out that this is covered in open-telemetry/oteps#16. 😃 Although I'm not sure if this can or should be used to solve that problem.

@SergeyKanzhelev SergeyKanzhelev modified the milestones: API revision: 07-2019, Alpha v0.3 Sep 27, 2019
@jmacd
Copy link
Contributor

jmacd commented Dec 4, 2019

Related: #51

@tedsuo
Copy link
Contributor

tedsuo commented Dec 4, 2019

Since we have merged in #263 I would like to close this for now, please reopen if you feel your concerns have not been addressed.

@tedsuo tedsuo closed this as completed Dec 4, 2019
@untitaker
Copy link

untitaker commented Dec 4, 2019

Do I understand it correctly that http client instrumentation is supposed to create a single http-type span regardless of the amount of redirects (specifically referring to the OP example)

If I really want to represent the raw network operations with parsed HTTP data, should I just make up my own component identifier and reuse the existing http.* tags?

@jmacd
Copy link
Contributor

jmacd commented Dec 5, 2019

I don't think so @untitaker. I see this as a question about how to set SpanKind when redirects take place.

@untitaker
Copy link

right @jmacd I think we're roughly on the same page wrt what the question is. It's just unclear to me what the answer is.

@jmacd jmacd reopened this Dec 5, 2019
@carlosalberto
Copy link
Contributor

Bumping it to a future milestone.

@carlosalberto carlosalberto modified the milestones: Alpha v0.3, Future Jan 28, 2020
@reyang reyang added the release:required-for-ga Must be resolved before GA release, or nice to have before GA label Jul 6, 2020
@reyang reyang added the priority:p2 Medium priority level label Jul 24, 2020
@tigrannajaryan
Copy link
Member

Do we still believe this is a must-have for GA? It is a guidance to instrumentation. If changed after GA it will not break any API or end-user code but may result in different trace composition. I think trace composition is not something we should consider part of our stability guarantees, hence I suggest we don't attempt to finalize such behavior before GA.
Given above reasoning I propose to remove release:required-for-ga label.

@Oberon00 Oberon00 added release:after-ga Not required before GA release, and not going to work on before GA and removed release:required-for-ga Must be resolved before GA release, or nice to have before GA labels Sep 9, 2020
@andrewhsu andrewhsu removed the priority:p2 Medium priority level label Sep 9, 2020
rockb1017 pushed a commit to rockb1017/opentelemetry-specification that referenced this issue Nov 18, 2021
)

* Update CONTRIBUTING.md with a proper Splunk CLA link

* Update specification/templates/CONTRIBUTING.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

* Update specification/templates/CONTRIBUTING.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 21, 2024
* zPages proposal

* renamed file to the PR number

* linter issues

* linter issues

* added some principles for zPages development

* fixes after Reiley review
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 23, 2024
* zPages proposal

* renamed file to the PR number

* linter issues

* linter issues

* added some principles for zPages development

* fixes after Reiley review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions release:after-ga Not required before GA release, and not going to work on before GA
Projects
None yet
Development

No branches or pull requests