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

SNOW-1023673 Implement common encode and serialize methods using OTEL v0.12.0 #8

Conversation

sfc-gh-tmonk
Copy link
Collaborator

No description provided.

@sfc-gh-tmonk sfc-gh-tmonk requested a review from a team as a code owner February 8, 2024 01:17
@sfc-gh-vguttha
Copy link

Trying to learn what is happening in this PR. Is there description/document that explains in detail what we are trying to do? Thanks!!

@sfc-gh-tmonk sfc-gh-tmonk force-pushed the tmonk-SNOW-1023673-improve-python-lib branch from 2eb262c to fbdd139 Compare February 15, 2024 19:25
@sfc-gh-tmonk sfc-gh-tmonk changed the title SNOW-1023673 Implement stable encoder methods that can be versioned in our library SNOW-1023673 Implement common encode and serialize methods using OTEL v0.12.0 Feb 15, 2024
@sfc-gh-tmonk sfc-gh-tmonk force-pushed the tmonk-SNOW-1023673-improve-python-lib branch from fbdd139 to 32366b9 Compare February 15, 2024 19:26
from opentelemetry.proto.logs.v1.logs_pb2 import LogsData


def encode_logs(batch: Sequence[LogRecord]) -> ExportLogsServiceRequest:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this at all? Can we just call directly into serialize_logs_data?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a non-public method that matches the same pattern that we used in metrics_encoder and trace_encoder. Since it's not part of the API, we can modify this implementation detail once we have our own logging handler that uses native Python LogRecords (instead of the OpenTelemetry version of LogRecords).

@sfc-gh-tmonk sfc-gh-tmonk force-pushed the tmonk-SNOW-1023673-improve-python-lib branch 2 times, most recently from 7e92dac to 402120b Compare February 15, 2024 20:35
@sfc-gh-tmonk sfc-gh-tmonk force-pushed the tmonk-SNOW-1023673-improve-python-lib branch from 402120b to ac1d433 Compare February 15, 2024 21:01
@sfc-gh-bdrutu sfc-gh-bdrutu merged commit 6f83837 into snowflakedb:main Feb 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants