Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions instana/instrumentation/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def _extract_custom_headers(self, span, headers):

def _collect_kvs(self, scope, span):
try:
span.set_tag('span.kind', 'entry')
span.set_tag('http.path', scope.get('path'))
span.set_tag('http.method', scope.get('method'))

Expand Down
2 changes: 1 addition & 1 deletion instana/instrumentation/fastapi_inst.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def instana_exception_handler(request, exc):
span = async_tracer.active_span

if span is not None:
if hasattr(exc, 'detail'):
if hasattr(exc, 'detail') and (500 <= exc.status_code <= 599):
span.set_tag('http.error', exc.detail)
span.set_tag('http.status_code', exc.status_code)
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion instana/recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class StanRecorder(object):
THREAD_NAME = "Instana Span Reporting"

REGISTERED_SPANS = ("aiohttp-client", "aiohttp-server", "asgi", "aws.lambda.entry", "boto3", "cassandra",
REGISTERED_SPANS = ("aiohttp-client", "aiohttp-server", "aws.lambda.entry", "boto3", "cassandra",
"celery-client", "celery-worker", "couchbase", "django", "gcs", "log",
"memcache", "mongo", "mysql", "postgres", "pymongo", "rabbitmq", "redis",
"render", "rpc-client", "rpc-server", "sqlalchemy", "soap", "tornado-client",
Expand Down
6 changes: 3 additions & 3 deletions instana/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _validate_tags(self, tags):
:param tags: dict of tags
:return: dict - a filtered set of tags
"""
filtered_tags = {}
filtered_tags = DictionaryOfStan()
for key in tags.keys():
validated_key, validated_value = self._validate_tag(key, tags[key])
if validated_key is not None and validated_value is not None:
Expand Down Expand Up @@ -227,14 +227,14 @@ def get_span_kind(self, span):


class RegisteredSpan(BaseSpan):
HTTP_SPANS = ("aiohttp-client", "aiohttp-server", "asgi", "django", "http", "soap", "tornado-client",
HTTP_SPANS = ("aiohttp-client", "aiohttp-server", "django", "http", "soap", "tornado-client",
"tornado-server", "urllib3", "wsgi")

EXIT_SPANS = ("aiohttp-client", "boto3", "cassandra", "celery-client", "couchbase", "log", "memcache",
"mongo", "mysql", "postgres", "rabbitmq", "redis", "rpc-client", "sqlalchemy",
"soap", "tornado-client", "urllib3", "pymongo", "gcs")

ENTRY_SPANS = ("aiohttp-server", "asgi", "aws.lambda.entry", "celery-worker", "django", "wsgi", "rabbitmq",
ENTRY_SPANS = ("aiohttp-server", "aws.lambda.entry", "celery-worker", "django", "wsgi", "rabbitmq",
"rpc-server", "tornado-server")

LOCAL_SPANS = ("render")
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def check_setuptools():
'opentracing>=2.3.0',
'requests>=2.8.0',
'six>=1.12.0',
'urllib3>=1.18.1'],
'urllib3<1.26,>=1.21.1'],
entry_points={
'instana': ['string = instana:load'],
'flask': ['string = instana:load'], # deprecated: use same as 'instana'
Expand All @@ -79,14 +79,14 @@ def check_setuptools():
'nose>=1.0',
'pyramid>=1.2',
'pytest>=4.6',
'urllib3[secure]>=1.15,<=1.25.11'
'urllib3[secure]!=1.25.0,!=1.25.1,<1.26,>=1.21.1'
],
'test-cassandra': [
'cassandra-driver==3.20.2',
'mock>=2.0.0',
'nose>=1.0',
'pytest>=4.6',
'urllib3[secure]>=1.15<=1.25.11'
'urllib3[secure]!=1.25.0,!=1.25.1,<1.26,>=1.21.1'
],
'test-couchbase': [
'couchbase==2.5.9',
Expand Down Expand Up @@ -122,7 +122,7 @@ def check_setuptools():
'suds-jurko>=0.6',
'tornado>=4.5.3,<6.0',
'uvicorn>=0.12.2;python_version>="3.6"',
'urllib3[secure]>=1.15,<=1.25.11'
'urllib3[secure]!=1.25.0,!=1.25.1,<1.26,>=1.21.1'
],
},
test_suite='nose.collector',
Expand Down
Loading