open-telemetry / open-telemetry/opentelemetry-cpp

comment on Scope class is not accurate regarding span ended

Open Beginner friendly
#3,109 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale triage/accepted
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

api/include/opentelemetry/trace/scope.h has following comment on the Scope class:

/**
 * Controls how long a span is active.
 *
 * On creation of the Scope object, the given span is set to the currently
 * active span. On destruction, the given span is ended and the previously
 * active span will be the currently active span again.
 */
class Scope final

It specifies that "the given span is ended". This is not accurate. The span is not ended simply because scope object is destroyed.

Users may not explicitly call span.End() based on the comment. This could delay the end of span.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with api/include/opentelemetry/trace/scope.h and read the Scope class comment alongside the scope lifecycle described in the issue. Correct the statement about span ending so the documentation matches the actual behavior, then review the updated comment for clarity.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.