solarwinds / apm-python Goto Github PK
View Code? Open in Web Editor NEWOpenTelemetry-based SolarWinds APM Python library
License: Apache License 2.0
OpenTelemetry-based SolarWinds APM Python library
License: Apache License 2.0
Environment
2023 MacBook Pro
Apple M2 Max
Python 3.10.2
Steps to reproduce
requirements.txt
solarwinds-apm
flask
app.py
# Importing flask module in the project is mandatory
# An object of Flask class is our WSGI application.
from flask import Flask
# Flask constructor takes the name of
# current module (__name__) as argument.
app = Flask(__name__)
# The route() function of the Flask class is a decorator,
# which tells the application which URL should call
# the associated function.
@app.route('/')
# ‘/’ URL is bound with hello_world() function.
def hello_world():
return 'Hello World'
# main driver function
if __name__ == '__main__':
# run() method of Flask class runs the application
# on the local development server.
app.run()
Then
$ pip install -r requirements.txt
$ opentelemetry-bootstrap --action=install
$ opentelemetry-instrument python app.py
Expected behavior
Flask server starts up with otel instrumentation enabled
Actual behavior
Configuration of solarwinds_configurator failed
Traceback (most recent call last):
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 105, in _load_configurators
entry_point.load()().configure(auto_instrumentation_version=__version__) # type: ignore
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/configurator.py", line 38, in <module>
from solarwinds_apm.apm_config import SolarWindsApmConfig
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/apm_config.py", line 39, in <module>
from solarwinds_apm.extension.oboe import Context
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/extension/oboe.py", line 10, in <module>
from . import _oboe
ImportError: cannot import name '_oboe' from 'solarwinds_apm.extension' (/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/extension/__init__.py)
Failed to auto initialize opentelemetry
Traceback (most recent call last):
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 121, in initialize
_load_configurators()
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 109, in _load_configurators
raise exc
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 105, in _load_configurators
entry_point.load()().configure(auto_instrumentation_version=__version__) # type: ignore
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/configurator.py", line 38, in <module>
from solarwinds_apm.apm_config import SolarWindsApmConfig
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/apm_config.py", line 39, in <module>
from solarwinds_apm.extension.oboe import Context
File "/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/extension/oboe.py", line 10, in <module>
from . import _oboe
ImportError: cannot import name '_oboe' from 'solarwinds_apm.extension' (/Users/mkoch/.pyenv/versions/3.10.2/lib/python3.10/site-packages/solarwinds_apm/extension/__init__.py)
* Serving Flask app 'app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
^C%
Additional context
None
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.