I am unable to create events using python django
Describe the bug
I am unable to create events using python django
myapp/views.py
import logging
from opentelemetry import trace
class SomeView(LoginRequiredMixin, TemplateView):
login_required = True
template_name = "myapp/index.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("SomeView") as span:
if span.is_recording():
span.set_attribute("user.id", self.request.user.id)
span.set_attribute("user.email", self.request.user.email)
span.add_event("log", {
"log.severity": "info",
"log.message": "Mark was here.",
"user.id": self.request.user.id,
"user.email": self.request.user.email,
})
span.add_event("This is a span event")
logging.getLogger().error("This is a log message")
context['something'] = SomeThing.objects.all()
return context
To get more information on refer this SO-Thread
Expected behavior

Thanks for reaching out.
Could you share which azure SDK/service are you using?
Hi @Rithwik-Bojja. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
opentelemetry-api==1.23.0
Thnaks @scoopseven, I am using opentelemetry-api==1.23.0
Thanks for the information.
This repo is for Azure SDK libraries.
For opentelemetry-api library, maybe https://github.com/open-telemetry/opentelemetry-python/tree/main/opentelemetry-api is the right repo.