Open
Description
- Package Name: azure-monitor-opentelemetry
- Package Version: 1.3.0
- Operating System: Linux (App Service)
- Python Version: 3.11.7
Describe the bug
When usng configure_azure_monitor()
to monitor the application, the Application Map displays some request times in minutes and seconds when they are meant to be in milliseconds. I am not sure if this is a bug within Azure or the SDK, however it only appears for the request using the requests
library, and not the Azure SDK.
To Reproduce
requirements.txt
azure-monitor-opentelemetry==1.3.0
azure-storage-blob==12.19.1
requests==2.31.0
app.py
from azure.monitor.opentelemetry import configure_azure_monitor
configure_azure_monitor()
import os
import requests
from azure.storage.blob import BlobServiceClient
from flask import Flask
app = Flask(__name__)
@app.route("/")
def root():
return requests.get("https://www.google.com").text
@app.route("/blob")
def blob():
blob_service_client = BlobServiceClient.from_connection_string(
os.environ["AZURE_STORAGE_CONNECTION_STRING"]
)
return str([container.name for container in blob_service_client.list_containers()])
- Log into Azure CLI
- Run command
az webapp up
- Once deployed, edit environment variables on app
APPLICATIONINSIGHTS_CONNECTION_STRING
AZURE_STORAGE_CONNECTION_STRING
(Connection string to any storage account)
- In the app navigate to
/
and to/blob
- View Application Map in Application Insights
Expected behavior
Calls should be displayed in milliseconds
Metadata
Metadata
Assignees
Labels
Monitor, Monitor Ingestion, Monitor QueryWorkflow: This issue is responsible by Azure service team.Issues that are reported by GitHub users external to the Azure organization.Workflow: This issue needs attention from Azure service team or SDK teamThe issue doesn't require a change to the product in order to be resolved. Most issues start as that