You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to run the python/samples/demos/telemetry example using the command python main.py --scenario ai_service by enabling AzureAIInferenceChatCompletion instead of the default OpenAIChatCompletion. However, I cannot see any logs in my App Insights instance under Monitoring > Logs > Tables > traces. In contrast, logs appear correctly when using the alternative setup provided in the documentation.
fromazure.monitor.opentelemetryimportconfigure_azure_monitorimportloggingfromopentelemetryimporttrace# Configure Azure Monitorconfigure_azure_monitor(
connection_string="...",
)
# Get logger and tracerlogger=logging.getLogger(__name__)
tracer=trace.get_tracer(__name__)
# Log and tracelogger.warning("This is a warning")
withtracer.start_as_current_span("operation_name") asspan:
span.set_attribute("attribute_key", "value")
logger.info("Operation in progress")
The text was updated successfully, but these errors were encountered:
Hello,
I attempted to run the
python/samples/demos/telemetry
example using the commandpython main.py --scenario ai_service
by enablingAzureAIInferenceChatCompletion
instead of the defaultOpenAIChatCompletion
. However, I cannot see any logs in my App Insights instance under Monitoring > Logs > Tables > traces. In contrast, logs appear correctly when using the alternative setup provided in the documentation.The text was updated successfully, but these errors were encountered: