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

Too noise logging about telemetry #441

Closed
mik-laj opened this issue Dec 18, 2020 · 4 comments · Fixed by #442
Closed

Too noise logging about telemetry #441

mik-laj opened this issue Dec 18, 2020 · 4 comments · Fixed by #442
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@mik-laj
Copy link

mik-laj commented Dec 18, 2020

Hello,

In the Apache Airflow project, we use the BigQuery library, but recently we've started to see annoying log message when the library is loaded. It is enough that the library is loaded and there is an message every time.

In my opinion, this message should be of a lower level (DEBUG) so that it is not displayed much less often or is displayed only when the client is initialized.

import logging
logging.basicConfig(level=logging.INFO)

from google.cloud import bigquery

Output:

INFO:google.cloud.bigquery.opentelemetry_tracing:This service is instrumented using OpenTelemetry. OpenTelemetry could not be imported; please add opentelemetry-api and opentelemetry-instrumentation packages in order to get BigQuery Tracing data.

Related issue: apache/airflow#13131

CC: @tswast

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Dec 18, 2020
@mik-laj
Copy link
Author

mik-laj commented Dec 18, 2020

@tswast this problem is in part related to the implementation of your AIP. https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-8+Split+Providers+into+Separate+Packages+for+Airflow+2.0
Now we need to load a few more classes to be able to read the attributes of some classes, which unfortunately leads to the BigQuery client being loaded as well.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 19, 2020
@tswast tswast added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Dec 21, 2020
@tswast tswast self-assigned this Dec 21, 2020
@tswast
Copy link
Contributor

tswast commented Dec 21, 2020

Sent #442 to drop the logging level to DEBUG

@tswast
Copy link
Contributor

tswast commented Dec 21, 2020

Reading the Airflow issue, I think the problem is that there is any sort of message at import time. I'll see if there's a different way we can show this warning when opentelemetry is specifically requested. Or perhaps just remove it.

@tswast
Copy link
Contributor

tswast commented Jan 11, 2021

This is fixed in google-cloud-bigquery==2.6.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants