This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter | |
from fastapi import FastAPI, Request | |
from fastapi.responses import JSONResponse | |
from opentelemetry.context import get_current as get_current_context | |
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor | |
from opentelemetry.sdk.trace import TracerProvider, _Span | |
from opentelemetry.sdk.trace.export import (BatchSpanProcessor, | |
ConsoleSpanExporter, | |
SimpleSpanProcessor) | |
from starlette.exceptions import HTTPException as StarletteHTTPException |