Skip to content

ContextManager.activeSpan() API usage error #3055

@zhaoyuguang

Description

@zhaoyuguang

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirement
  • Feature or performance improvement

Question

Look the code. such as:
image
image
The code uses ContextManager.activeSpan() to determine if there is an active span in the current thread, which will cause NPE when no active span. The correct approach should be ContextManager.isActive()

I am right?

Metadata

Metadata

Assignees

Labels

agentLanguage agent related.bugSomething isn't working and you are sure it's a bug!

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions