Refactor span context#801
Merged
bobstrecansky merged 46 commits intoSep 21, 2022
Merged
Conversation
amber0612
marked this pull request as ready for review
August 26, 2022 14:53
brettmc
reviewed
Aug 28, 2022
brettmc
reviewed
Aug 28, 2022
Nevay
reviewed
Aug 29, 2022
brettmc
reviewed
Sep 7, 2022
brettmc
reviewed
Sep 7, 2022
brettmc
approved these changes
Sep 8, 2022
kishannsangani
previously requested changes
Sep 8, 2022
amber0612
requested review from
kishannsangani
and removed request for
bobstrecansky,
tidal and
zsistla
September 9, 2022 11:11
Nevay
reviewed
Sep 9, 2022
| public const TRACE_FLAG_DEFAULT = 0x00; | ||
|
|
||
| /** @inheritDoc */ | ||
| public static function createFromRemoteParent(string $traceId, string $spanId, int $traceFlags= self::TRACE_FLAG_DEFAULT, ?TraceStateInterface $traceState = null): SpanContextInterface |
Contributor
There was a problem hiding this comment.
I still think that these methods should stay in SpanContext.
| $this->isSampled = ($traceFlags & self::TRACE_FLAG_SAMPLED) === self::TRACE_FLAG_SAMPLED; | ||
| $this->traceFlags = $traceFlags; | ||
| $this->isValid = self::isValidTraceId($this->traceId) && self::isValidSpanId($this->spanId); | ||
| $this->isValid = SpanContextValidator::isValidTraceId($this->traceId) && SpanContextValidator::isValidSpanId($this->spanId); |
Contributor
There was a problem hiding this comment.
Can be moved into if-block above / should be moved into factory method to be able to reuse ::getInvalid() singleton.
bobstrecansky
dismissed
kishannsangani’s stale review
September 21, 2022 12:07
Changes have been made
bobstrecansky
approved these changes
Sep 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR for #618
Remove use OpenTelemetry\API\Trace as API;
Move factory methods into dedicated factory
Move validation methods into dedicated validatoe
Move constructor and properties to the top