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-1738854: TelemetryService sends messages but they do not appear in Snowflake's logs #1921

Closed
illegalnumbers opened this issue Oct 15, 2024 · 4 comments
Assignees
Labels
invalid status-triage_done Initial triage done, will be further handled by the driver team

Comments

@illegalnumbers
Copy link

illegalnumbers commented Oct 15, 2024

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of JDBC driver are you using?
    3.19.0

  2. What operating system and processor architecture are you using?
    alpine x64

  3. What version of Java are you using?
    17

  4. What did you do?

Sending a message using the logging for the telemetry service results in a true response from the Future but no message in in my Snowflake account.

 telemetry.addLogToBatch(TelemetryUtil.buildJobData(msg));

My message format is as follows

{\"timestamp\":\"1729025764888\",\"message\":{\"source\":\"string_with_underscore\",\"type\":\"string_with_underscore\",\"data\":{\"app_name\":\"string_with_underscore\",\"task_id\":\"0\",\"start_time\":1729025764791},\"version\":\"string_with_underscore\"}}
       boolean telemetrySuccess = telemetry.sendBatchAsync().get();
  1. What did you expect to see?

this gets a telemetrySuccess response of true but I dont see anything in my account

  1. Can you set logging to DEBUG and collect the logs?

not immediately

@github-actions github-actions bot changed the title TelemetryService sends messages but they do not appear in Snowflake's logs SNOW-1738854: TelemetryService sends messages but they do not appear in Snowflake's logs Oct 15, 2024
@sfc-gh-wfateem sfc-gh-wfateem self-assigned this Oct 30, 2024
@sfc-gh-wfateem sfc-gh-wfateem added status-triage Issue is under initial triage invalid status-triage_done Initial triage done, will be further handled by the driver team status-information_needed Additional information is required from the reporter and removed bug status-triage Issue is under initial triage labels Oct 30, 2024
@sfc-gh-wfateem
Copy link
Collaborator

@illegalnumbers The TelemetryService and TelemetryClient classes are intended for internal use only by the JDBC driver. I'm assuming you were checking the telemetry table/view mentioned here. That's only relevant if you were using the observability feature mentioned here. If you didn't define an event table, then the telemetry table referenced in the first link is going to be your default one.

@sfc-gh-wfateem sfc-gh-wfateem removed the status-information_needed Additional information is required from the reporter label Nov 1, 2024
@illegalnumbers
Copy link
Author

tldr, the client that i am using is not on a udf so it will never report anything even though the response from the client is 'true'. the recommendation was not to do this and not to use these internal classes.

@illegalnumbers
Copy link
Author

honestly, i would maybe push to have the client return false or throw an exception in this case because...nothing happens.

@illegalnumbers
Copy link
Author

from the docs provided You can log messages (such as warning or error messages) from a stored procedure, UDF, or UDTF, including those you write [using Snowpark APIs](https://docs.snowflake.com/developer-guide/snowpark/index).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants