Skip to content

SNOW-3152214: add id generator for external telemetry#4082

Open
sfc-gh-yuwang wants to merge 9 commits intomainfrom
yuwang-add-trace-id
Open

SNOW-3152214: add id generator for external telemetry#4082
sfc-gh-yuwang wants to merge 9 commits intomainfrom
yuwang-add-trace-id

Conversation

@sfc-gh-yuwang
Copy link
Collaborator

@sfc-gh-yuwang sfc-gh-yuwang commented Feb 19, 2026

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-3152214

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

    This PR is meant to add span id generator that is needed for snowsight UI.
    for this PR, a forked id generator is used, the reason is that:
    currently snowflake-telemetry-python is pinning opentelemetry to 1.26.0, which is built with a very old protobuf version, while snowpark require using a newer protobuf version, which leads to conflicts.

We will switch to snowflake-telemetry-python implementation once they release a newer version

@sfc-gh-yuwang sfc-gh-yuwang requested review from a team as code owners February 19, 2026 21:00
@sfc-gh-yuwang sfc-gh-yuwang added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Feb 19, 2026
@sfc-gh-yuwang sfc-gh-yuwang changed the title NO SNOW: add id generator for external telemetry SNOW-3152214: add id generator for external telemetry Feb 23, 2026

else:

class ForkedSnowflakeTraceIdGenerator(ABC):

Choose a reason for hiding this comment

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

do we need this because if this is else we will not hit bit below where we are using ForkedSnowflakeTraceIdGenerator right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, otherwise there would be compilation error

trace_id = gen.generate_trace_id()

assert trace_id != trace.INVALID_TRACE_ID
assert trace_id.to_bytes(16, byteorder="big", signed=False) == (

Choose a reason for hiding this comment

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

Can we also check first 4Bytes is timestamp in minute?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants