У меня есть простой скрипт Python, и я следующему примеру:
https://github.com/azure/azure-sdk-for- ... ntelemetry /samples/metrics/attributes.py
код:
import logging
from azure.monitor.opentelemetry import configure_azure_monitor
from azure.identity import DefaultAzureCredential
from opentelemetry import metrics
large_attribute_set = {}
for i in range(20):
key = "key{}".format(i)
val = "val{}".format(i)
large_attribute_set[key] = val
credential = DefaultAzureCredential()
configure_azure_monitor(
logger_name=__name__,
credential=credential,
connection_string="InstrumentationKey=xx-xx-xx-xx-xx;IngestionEndpoint=https://westeurope-5.in.applicationinsi ... =x-x-x-x-x",
)
logger = logging.getLogger(__name__)
meter = metrics.get_meter_provider().get_meter("sample")
counter = meter.create_counter("my_counter")
counter.add(1)
logger.info("info1", extra=large_attribute_set)
logger.warning("warning1", extra=large_attribute_set)
logger.error("error1", extra=large_attribute_set)
logger.critical("critical1", extra=large_attribute_set)
< /code>
В коде Visual Studio я запускаю:
azd auth login < /p>
Я не получаю никаких ошибок. Однако нет журналов:
i Иметь следующее доступ к приложению Insigths:
Подробнее здесь: https://stackoverflow.com/questions/794 ... g-anything
Azure.monitor.opentelemetry - ничего не регистрирую ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Как соединить OpenTelemetry (opentelemetry-java-instrumentation) и Micrometer
Anonymous » » в форуме JAVA - 0 Ответы
- 71 Просмотры
-
Последнее сообщение Anonymous
-