Skip to content

Commit 033e03f

Browse files
committed
Revert back to master before serverless implementation.
1 parent c8e8012 commit 033e03f

File tree

8 files changed

+1
-528
lines changed

8 files changed

+1
-528
lines changed

aws_xray_sdk/core/exceptions/exceptions.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ class FacadeSegmentMutationException(Exception):
2222
pass
2323

2424

25-
class MimicSegmentInvalidException(Exception):
26-
pass
27-
28-
2925
class MissingPluginNames(Exception):
3026
pass
3127

aws_xray_sdk/core/models/mimic_segment.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

aws_xray_sdk/core/recorder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ def begin_segment(self, name=None, traceid=None,
243243
self._populate_runtime_context(segment, decision)
244244

245245
self.context.put_segment(segment)
246-
current_segment = self.get_trace_entity()
247-
return current_segment
246+
return segment
248247

249248
def end_segment(self, end_time=None):
250249
"""

aws_xray_sdk/core/serverless_lambda_context.py

Lines changed: 0 additions & 130 deletions
This file was deleted.

aws_xray_sdk/ext/django/middleware.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import logging
22

33
from aws_xray_sdk.core import xray_recorder
4-
from aws_xray_sdk.core.lambda_launcher import check_in_lambda, LambdaContext
54
from aws_xray_sdk.core.models import http
6-
from aws_xray_sdk.core.serverless_lambda_context import ServerlessLambdaContext
75
from aws_xray_sdk.core.utils import stacktrace
86
from aws_xray_sdk.ext.util import calculate_sampling_decision, \
97
calculate_segment_name, construct_xray_header, prepare_response_header
@@ -27,13 +25,6 @@ def __init__(self, get_response):
2725

2826
self.get_response = get_response
2927

30-
# The case when the middleware is initialized in a Lambda Context, we make sure
31-
# to use the ServerlessLambdaContext so that the middleware properly functions.
32-
# We also check if the current context is a LambdaContext to not override customer
33-
# provided contexts.
34-
if check_in_lambda() is not None and type(xray_recorder.context) == LambdaContext:
35-
xray_recorder.context = ServerlessLambdaContext()
36-
3728
# hooks for django version >= 1.10
3829
def __call__(self, request):
3930

aws_xray_sdk/ext/flask/middleware.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import flask.templating
22
from flask import request
33

4-
from aws_xray_sdk.core.lambda_launcher import check_in_lambda, LambdaContext
54
from aws_xray_sdk.core.models import http
6-
from aws_xray_sdk.core.serverless_lambda_context import ServerlessLambdaContext
75
from aws_xray_sdk.core.utils import stacktrace
86
from aws_xray_sdk.ext.util import calculate_sampling_decision, \
97
calculate_segment_name, construct_xray_header, prepare_response_header
@@ -20,13 +18,6 @@ def __init__(self, app, recorder):
2018
self.app.after_request(self._after_request)
2119
self.app.teardown_request(self._handle_exception)
2220

23-
# The case when the middleware is initialized in a Lambda Context, we make sure
24-
# to use the ServerlessLambdaContext so that the middleware properly functions.
25-
# We also check if the current context is a LambdaContext to not override customer
26-
# provided contexts.
27-
if check_in_lambda() is not None and type(self._recorder.context) == LambdaContext:
28-
self._recorder.context = ServerlessLambdaContext()
29-
3021
_patch_render(recorder)
3122

3223
def _before_request(self):

tests/test_mimic_segment.py

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)