Created
July 24, 2018 06:40
-
-
Save pglombardo/4d8e8481f2b3d373cccf9930e4b472fb to your computer and use it in GitHub Desktop.
Falcon app with Instana WSGI middleware
This file contains hidden or 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
import falcon | |
import instana | |
from instana.wsgi import iWSGIMiddleware | |
instana.service_name = "Falcon_Service" | |
# Falcon follows the REST architectural style, meaning (among | |
# other things) that you think in terms of resources and state | |
# transitions, which map to HTTP verbs. | |
class ThingsResource(object): | |
def on_get(self, req, resp): | |
"""Handles GET requests""" | |
resp.status = falcon.HTTP_200 # This is the default status | |
resp.body = ('\nTwo things awe me most, the starry sky Its the end of hte world as we know it' | |
'above me and the moral law within me.\n' | |
'\n' | |
' ~ Immanuel Kant\n\n') | |
# falcon.API instances are callable WSGI apps | |
app = falcon.API() | |
# Resources are represented by long-lived class instances | |
things = ThingsResource() | |
# things will handle all requests to the '/things' URL path | |
app.add_route('/things', things) | |
app = iWSGIMiddleware(app) |
Do you think we have different versions of the Python Sensor ?
Here is a link to the running application. I have request hitting it every 5 minutes and no traces are showing up.
https://sesandbox-instana.instana.io/#/physical?timeline.to&timeline.ws=600000&v2=false&snapshotId=CfHLnpo4A1Qi02NS2X9bvQHRoZA&traceId=-969967781993543767
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These are my ENV variables. I am still not getting traces.
#!/usr/bin/env bash
export INSTANA_DEV=true
export AUTOWRAPT_BOOTSTRAP=instana
export INSTANA_SERVICE_NAME=FalconService