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

Refactor TraceState's __toString method #727

Closed
tidal opened this issue Jun 24, 2022 · 1 comment · Fixed by #729
Closed

Refactor TraceState's __toString method #727

tidal opened this issue Jun 24, 2022 · 1 comment · Fixed by #729
Assignees
Labels
bite sized This is a small chunk of work (good for new or time limited contributors!) good first issue Good for newcomers help wanted This issue is looking for someone to work on it nice-to-have a nice to have thing! refactoring Doesn't change behavior, but improves performance or maintainability or removes technical debt.

Comments

@tidal
Copy link
Member

tidal commented Jun 24, 2022

TraceState's __toString method should be refactored for better performance and readability

  • Remove unnessesary cloning of current instance
  • Reverse check to a guard clause:
if (empty($this->traceState)) {
    return '';
}
@tidal tidal added help wanted This issue is looking for someone to work on it good first issue Good for newcomers bite sized This is a small chunk of work (good for new or time limited contributors!) refactoring Doesn't change behavior, but improves performance or maintainability or removes technical debt. nice-to-have a nice to have thing! labels Jun 24, 2022
@amber0612
Copy link
Contributor

Please assign this to me @tidal.

bobstrecansky pushed a commit that referenced this issue Jun 29, 2022
…ation#704 (#729)

* Otel-php:632 Move stack trace formatting out of Span class

* added function usages

* fix linting errors

* Added documentation for adding Span Attributes

* removing TracingUtl class

* Refactor TraceState's __toString method
@tidal tidal closed this as completed Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bite sized This is a small chunk of work (good for new or time limited contributors!) good first issue Good for newcomers help wanted This issue is looking for someone to work on it nice-to-have a nice to have thing! refactoring Doesn't change behavior, but improves performance or maintainability or removes technical debt.
Projects
None yet
2 participants