Skip to content

[chore] Don't use deprecated [Span|Trace]ID.HexString method#16301

Merged
dmitryax merged 1 commit into
open-telemetry:mainfrom
dmitryax:replace-usages-of-hexstring
Nov 15, 2022
Merged

[chore] Don't use deprecated [Span|Trace]ID.HexString method#16301
dmitryax merged 1 commit into
open-telemetry:mainfrom
dmitryax:replace-usages-of-hexstring

Conversation

@dmitryax

@dmitryax dmitryax commented Nov 15, 2022

Copy link
Copy Markdown
Member

The methods were deprecated in open-telemetry/opentelemetry-collector#6530. The current method behavior is preserved in new functions added in internal/coreinternal/traceutil. This commit updates all the usages of HexString where the result is used as an identifier to the new internal methods.

Updates open-telemetry/opentelemetry-collector#6514

@bogdandrutu bogdandrutu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should create issues to every component and assign to owners to decide if empty string is expected for their encoding or "000000000000000...0000" is the expected value, and update their code to not use the new helper.

@dmitryax dmitryax force-pushed the replace-usages-of-hexstring branch from f511925 to 5e17c7f Compare November 15, 2022 01:05
The methods were deprecated since there is no establish convention on how to decode empty trace or span IDs at this point. The current method behavior is preserved in functions added in internal/coreinternal/traceutil. This commit updates all the usages of HexString where the result is used as identifier to the new internal methods.
@dmitryax dmitryax force-pushed the replace-usages-of-hexstring branch from 5e17c7f to 0bf06be Compare November 15, 2022 02:07
Exceptions: []awsxray.Exception{
{
ID: aws.String(hexID),
ID: aws.String(hex.EncodeToString(segmentID[:])),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we know it's not empty here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newSegmentID always generates a not empty span ID

@dmitryax dmitryax merged commit bb4e081 into open-telemetry:main Nov 15, 2022
@dmitryax dmitryax deleted the replace-usages-of-hexstring branch November 15, 2022 17:30
JaredTan95 pushed a commit to openinsight-proj/opentelemetry-collector-contrib that referenced this pull request Nov 21, 2022
…lemetry#16301)

The methods were deprecated since there is no establish convention on how to decode empty trace or span IDs at this point. The current method behavior is preserved in functions added in internal/coreinternal/traceutil. This commit updates all the usages of HexString where the result is used as identifier to the new internal methods.
shalper2 pushed a commit to shalper2/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2022
…lemetry#16301)

The methods were deprecated since there is no establish convention on how to decode empty trace or span IDs at this point. The current method behavior is preserved in functions added in internal/coreinternal/traceutil. This commit updates all the usages of HexString where the result is used as identifier to the new internal methods.
@plantfansam plantfansam mentioned this pull request Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants