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

[sdk-trace-base] add debug-level log with stack trace when modifying neded span #5113

Open
3 tasks
pichlermarc opened this issue Nov 5, 2024 · 4 comments · May be fixed by #5184
Open
3 tasks

[sdk-trace-base] add debug-level log with stack trace when modifying neded span #5113

pichlermarc opened this issue Nov 5, 2024 · 4 comments · May be fixed by #5184
Assignees
Labels
good first issue Good for newcomers needs:code-contribution This feature/bug is ready to implement pkg:sdk-trace-base type:feature A feature with no sub-issues to address up-for-grabs Good for taking. Extra help will be provided by maintainers

Comments

@pichlermarc
Copy link
Member

pichlermarc commented Nov 5, 2024

Description

Since the requirement for the OTel API is to not throw when invalid operations are performed, we log a warning instead when an operation on an already ended span will have no effect. However, because usually there's no stack trace attached to it, it is difficult to chase down where these invalid operations are happening.

The goal of this issue is to add a debug-level log right after the warn-level log that also provides a stack trace.

This issue is considered done when:

  • A debug-level log has been added that provides a stack trace
  • The warn-level log message has been amended to mention that changing the level to debug will provide the stack trace
  • Tests have been added in this file (adding it here will ensure that both Node.js and Browser cases are tested)

Additional Requirements

  • Since this is sdk-trace-base, the chosen approach MUST work for both Node.js and Browser

Additional Info and Links

@pichlermarc pichlermarc added pkg:sdk-trace-base needs:refinement This issue needs to be refined/broken apart into sub-issues before implementation type:feature A feature with no sub-issues to address labels Nov 5, 2024
@pichlermarc pichlermarc changed the title [sdk-trace-base] add verbose-level log with stack trace when [sdk-trace-base] add verbose-level log with stack trace when modifying neded span Nov 5, 2024
@pichlermarc pichlermarc changed the title [sdk-trace-base] add verbose-level log with stack trace when modifying neded span [sdk-trace-base] add debug-level log with stack trace when modifying neded span Nov 6, 2024
@pichlermarc pichlermarc added good first issue Good for newcomers up-for-grabs Good for taking. Extra help will be provided by maintainers needs:code-contribution This feature/bug is ready to implement and removed needs:refinement This issue needs to be refined/broken apart into sub-issues before implementation labels Nov 6, 2024
@Victorsesan
Copy link

@pichlermarc Still up for grabs? Would give it a try

@pichlermarc
Copy link
Member Author

yep, still up-for-grabs 👍
It's yours - thanks for working on this 🙂

Victorsesan added a commit to Victorsesan/opentelemetry-js that referenced this issue Nov 17, 2024
…ded spans, making it easier to trace issues in both Node.js and Browser environments

Reviewer: pichlermarc
Refs: open-telemetry#5113
@Victorsesan
Copy link

👋 @pichlermarc my first shot on this up for review.

@pichlermarc
Copy link
Member Author

@Victorsesan the commit you linked looks good % the changes to package.json, which should not be needed for this - would you mind opening a pull request? 🙂

Victorsesan added a commit to Victorsesan/opentelemetry-js that referenced this issue Nov 20, 2024
…ded spans, making it easier to trace issues in both Node.js and Browser environments

Reviewer: pichlermarc
Refs: open-telemetry#5113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers needs:code-contribution This feature/bug is ready to implement pkg:sdk-trace-base type:feature A feature with no sub-issues to address up-for-grabs Good for taking. Extra help will be provided by maintainers
Projects
None yet
2 participants