[azure-ai-agentserver-core] Standard Python logs are not exported in plain OTLP mode
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- observability
Línea de trabajo
Empieza leyendo la configuración de observabilidad de Agent Server, donde se llama a use_microsoft_opentelemetry(), y luego comprueba cómo microsoft-opentelemetry configura el registro plain OTLP cuando se proporciona logger_name. Pasa el nombre del logger raíz tal como se describe en el issue y comprueba que las inicializaciones repetidas del host sigan siendo idempotentes. Se considera terminado cuando los logs estándar de Python llegan al backend OTLP en modo plain OTLP sin handlers duplicados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
- Package Name: azure-ai-agentserver-core
- Package Version: 2.1.0
- Related Package: microsoft-opentelemetry 1.3.9
- Operating System: Linux (containerized runtime)
- Python Version: 3.13
Describe the bug
When azure-ai-agentserver-core is configured with an OTLP endpoint but no
Application Insights connection string, standard Python logs are not exported
through the OTLP logs pipeline.
The plain OTLP path successfully creates a LoggerProvider, log record
processors, and an OTLPLogExporter. However, Agent Server does not pass a
logger_name to use_microsoft_opentelemetry(). In
microsoft-opentelemetry==1.3.9, the plain OTLP setup attaches an
OpenTelemetry LoggingHandler only when logger_name is truthy. As a result,
the provider/exporter pipeline exists but is not connected to Python's root
logger.
This produces different behavior between the two supported export modes:
- Azure Monitor mode: standard Python logs are exported.
- Plain OTLP mode: direct OTel Logs API records are exported, but
logging.info(), Agent Server logs, and library logs are not.
To Reproduce
-
Configure the process with an OTLP endpoint and no Application Insights
connection string:OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318 OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf APPLICATIONINSIGHTS_CONNECTION_STRING is unset -
Construct an Agent Server host using the default observability setup:
import logging from azure.ai.agentserver.responses import ResponsesAgentServerHost app = ResponsesAgentServerHost() logging.getLogger(__name__).warning("standard-python-log") -
Send an invocation and inspect the configured OTLP backend.
-
Observe that traces and direct OTel log records arrive, but
standard-python-logdoes not.
Expected behavior
Standard Python logging should be connected to the LoggerProvider in plain
OTLP mode, matching the logging behavior of the Azure Monitor mode.
Agent Server can provide this behavior by passing the root logger explicitly:
use_microsoft_opentelemetry(
...,
logger_name="root",
)
logging.getLogger("root") resolves to Python's root logger. This preserves
Azure Monitor behavior while activating the existing plain OTLP
LoggingHandler setup.
The implementation should remain idempotent so repeated host initialization
does not create duplicate handlers or duplicate log export.
- Lenguaje dominante
- Python
- Estrellas
- 5.6k
- Forks
- 3.4k
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 212
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/azure-sdk-for-python
-
[Teams Chatbot]: Clarify Python dev-feed publication from a branch versus PyPI releasePosiblemente ocupada @jianingwang123 la tomó hace 1 día. Abiertocustomer-reported question
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Azure/azure-sdk-for-python#49548 · 1 comentario · 2 reacciones · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
azure-ai-evaluation: a content-harm score of 0 (no harm) is parsed as NaN in _parse_content_harm_response (numeric branch uses 0 < x instead of 0 <= x)Posiblemente ocupada @pujitha24 la tomó hace 17 días. AbiertoEvaluation Service Attention
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Azure/azure-sdk-for-python#49190 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Update CODEOWNERSAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Azure/azure-sdk-for-python#49183 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
azure-ai-evaluation: PromptyEvaluatorBase falls back to the first digit anywhere in the judge's reply, and the threshold turns a stray digit into a wrong pass/fail (15 evaluators)Posiblemente ocupada @wasim-builds la tomó hace 12 días. AbiertoEvaluation Service Attention
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Azure/azure-sdk-for-python#49153 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
azure-search-documents ContentUnderstandingSkill is missing model_name and model_deploymentPosiblemente ocupada @wasim-builds la tomó hace 12 días. AbiertoSearch Service Attention
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Azure/azure-sdk-for-python#48555 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/azure-sdk-for-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
UKGovernmentBEIS/control-arena#917 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
debpalash/VoiceStudio#2937 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws-samples/sample-per-model-bedrock#261 ·
Los mantenedores suelen responder en 1 día