fix: ensure that loglevel is to INFO

This commit is contained in:
Marc 2024-10-18 21:04:05 -04:00
parent 667eb667f2
commit ceb1a655d5
Signed by: marc
GPG key ID: 048E042F22B5DC79

View file

@ -10,7 +10,9 @@ from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
logger = logging.getLogger(__name__) logger = logging.getLogger("opentelemetry-export")
logging.basicConfig(level=logging.INFO)
class JobMetadata(pydantic.BaseModel, extra="ignore"): class JobMetadata(pydantic.BaseModel, extra="ignore"):
@ -119,6 +121,8 @@ def run():
create_span_from_run_metadata(metadata) create_span_from_run_metadata(metadata)
logger.info("Pushed trace to target!")
if __name__ == "__main__": if __name__ == "__main__":
run() run()