Skip to content

docs: updating trace API docstrings#1170

Merged
codeboten merged 2 commits intoopen-telemetry:masterfrom
toumorokoshi:feature/clarify-trace-api-documentation
Sep 30, 2020
Merged

docs: updating trace API docstrings#1170
codeboten merged 2 commits intoopen-telemetry:masterfrom
toumorokoshi:feature/clarify-trace-api-documentation

Conversation

@toumorokoshi
Copy link
Copy Markdown
Member

@toumorokoshi toumorokoshi commented Sep 27, 2020

The current docstrings were not factually correct, and different
wording provided better clarity:

  • start_as_current_span shoudl return the current span back
    to the previous current span in the context, rather than the
    parent span. This is the behavior of the SDK.
  • There is not "tracer context", simply the "context" object. So
    renaming references there.

See open-telemetry/opentelemetry-specification#1011 (comment)

Type of change

Please delete options that are not relevant.

  • This change requires a documentation update

Checklist:

  • Followed the style guidelines of this project
  • Documentation has been updated

The current docstrings were not factually correct, and different
wording provided better clarity:

- start_as_current_span shoudl return the current span back
  to the previous current span in the context, rather than the
  parent span. This is the behavior of the SDK.
- There is not "tracer context", simply the "context" object. So
  renaming references there.
parent can also be specified, either a `Span` or a `opentelemetry.trace.SpanContext`. If
the specified value is `None`, the created span will be a root span.
By default the current span in the context will be used as parent, but an
explicit parent can also be specified, either a `Span` or a `opentelemetry.trace.SpanContext`.
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.

FYI: I think this won't be the case after this change but we can probably update the docs afterwards to reflect this.

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.

Good point, I'll make sure to update it in that change.

@codeboten codeboten merged commit a71d383 into open-telemetry:master Sep 30, 2020
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