Splunk Observability Cloud

Cannot auto instrument apm via python

marklindo
New Member

Hello Splunkers,

I'm trying to send traces from an existing website that is built on top of Python (3.9.7) Django(4.1.3) and MySQL(8.0.32) hosted in linux to APM Observability. I'm having problems configuring via python instumentation.

here are the steps I did using a virtual environment based on the splunk docs:

  • installed open telemetry collector via curl script
  • installed instumentation packages for python environment
  • ran splunk-py-trace-bootstrap
  • set environment vaiables (OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES, OTEL_EXPORTER_OTLP_ENDPOINT, DJANGO_SETTINGS_MODULE)

When I enable the splunk otel python agent this it is giving me the below error :

Instrumenting of sqlite3 failed

ModuleNotFoundError: No module named '_sqlite3'
Failed to auto initialize opentelemetry

ModuleNotFoundError: No module named '_sqlite3'
Performing system checks...

I've already tried reinstalling the sqlite3 and even downloaded from python repository the contents of sqlite3 and manually replaced it on the sqlite3 file but still cannot proceed.

any help or direction would be very much apprecaited.

thanks!

Labels (2)
0 Karma

bishida
Splunk Employee
Splunk Employee

Hi,

Can you please share the exact commands you've run so far? And also the values of those environment variables you set?

Assuming these are the docs you're using:

Python

https://docs.splunk.com/observability/en/gdi/get-data-in/application/python/instrumentation/instrume...

Django

https://docs.splunk.com/observability/en/gdi/get-data-in/application/python/instrumentation/instrume...

 

0 Karma

marklindo
New Member

Hello,

indeed the links provided are the ones I'm following.

This issue has been resolved internally.

We found out that Django manages the web server instead of the manage.py for python.

Thank you for your response.

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...