-
Notifications
You must be signed in to change notification settings - Fork 127
Remove CAT #1489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lrafeei
wants to merge
108
commits into
develop-v12.0.0
Choose a base branch
from
remove_CAT
base: develop-v12.0.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Remove CAT #1489
Changes from 39 commits
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
61e2b9a
Remove cross_application_tracer.enabled setting
lrafeei e9bab52
Remove cat_enabled fixture
lrafeei fb1b85e
Remove validate_outbound_headers, make_cross_agent_headers
lrafeei 4df07f3
Remove path_hash
lrafeei e5a0d4e
Fix tornado tests
lrafeei d145940
Fix aiohttp tests
lrafeei 01da681
Fix httpx tests
lrafeei e3389f3
Fix pika tests
lrafeei a32ca51
Fix sanic tests
lrafeei 5b52a78
Remove more CAT tests
lrafeei 931b1c6
Remove nr.guid
lrafeei c9e7278
Rename synthetics in CatHeaderMixin
lrafeei 3df9e14
Remove process_response_headers
lrafeei 89c9fb5
Remove validate_external_node_params
lrafeei 23ff187
Rename CatHeaderMixin to HeaderMixin
lrafeei 566d250
Remove _generate_response_headers
lrafeei 521496c
Remove insert_incoming_headers
lrafeei f7bd2ee
Remove create_incoming_headers
lrafeei 5ed7055
Remove X-NewRelic-App-Data
lrafeei af451d6
Remove cross_process_id
lrafeei 1adb307
Remove external_txn_name
lrafeei 46436eb
Remove referring_transaction_guid
lrafeei 855d65e
Remove trip_id
lrafeei 954177d
Remove convert_to_cat_metadata_value
lrafeei 0f29d92
Change names from cat_ to dt_
lrafeei e550a5c
Tweak test
lrafeei c120b3f
Remove skip all test file
lrafeei 8d0db2c
Fix syntax from rebase
lrafeei a315e5d
Fix httplib test
lrafeei ea18200
Fix Megalinter errors
lrafeei bcb5dba
Remove commented out code
lrafeei 9d16587
Fix requests test
lrafeei a12b023
Merge branch 'develop-11.0.0' into remove_CAT
mergify[bot] 91cd056
Merge branch 'develop-11.0.0' into remove_CAT
mergify[bot] b91866b
Merge branch 'develop-11.0.0' into remove_CAT
lrafeei d88c7f5
Merge remote-tracking branch 'origin/main' into remove_CAT
TimPansino f53c517
Rename cross_process_headers to distributed_tracing_headers
TimPansino e4c8f8a
Merge branch 'main' into remove_CAT
mergify[bot] 5f57d60
Merge branch 'main' into remove_CAT
mergify[bot] 5a2523a
Remove cross agent cat fixtures
hmstepanek 6d0688f
Add back tenr.apdexPerfZone as not CAT specific
hmstepanek 7b3623f
Remove distributed_trace_key from header mixin
hmstepanek 102249c
Remove config instead of commenting out
hmstepanek d674907
Put back transactionGuid
hmstepanek 0fa69ec
Return None in process_response
hmstepanek 7f3fbd5
Still pass settings into finalize application settings call
hmstepanek 14d514b
DT_RESPONSE_CODE->RESPONSE_CODE
hmstepanek 9282bb3
Merge branch 'main' into remove_CAT
mergify[bot] a68e823
respond_with_dt_header->response_handler
hmstepanek efe1dd8
Merge branch 'remove_CAT' of github.com:newrelic/newrelic-python-agen…
hmstepanek 693de17
Fixup: syntax error
hmstepanek 6510cc1
Put back nr.guid if synthetics resource id
hmstepanek ddd584e
Remove cross_application_tracer.enabled setting
lrafeei d177cb7
Remove cat_enabled fixture
lrafeei 74f922a
Remove validate_outbound_headers, make_cross_agent_headers
lrafeei 695d2b9
Remove path_hash
lrafeei c4b6037
Fix tornado tests
lrafeei aaac4cb
Fix aiohttp tests
lrafeei 1d36f99
Fix httpx tests
lrafeei 71099fa
Fix pika tests
lrafeei 49c59cb
Fix sanic tests
lrafeei af418d7
Remove more CAT tests
lrafeei 0b945ad
Remove nr.guid
lrafeei 72f5cf1
Rename synthetics in CatHeaderMixin
lrafeei bb5215e
Remove process_response_headers
lrafeei 4658a32
Remove validate_external_node_params
lrafeei 80ab24a
Rename CatHeaderMixin to HeaderMixin
lrafeei ddcee7e
Remove _generate_response_headers
lrafeei 84a22e5
Remove insert_incoming_headers
lrafeei 840ec5a
Remove create_incoming_headers
lrafeei c2bb71a
Remove X-NewRelic-App-Data
lrafeei f4d1182
Remove cross_process_id
lrafeei c19488c
Remove external_txn_name
lrafeei 17e4359
Remove referring_transaction_guid
lrafeei 217063b
Remove trip_id
lrafeei 4907b13
Remove convert_to_cat_metadata_value
lrafeei c7b0584
Change names from cat_ to dt_
lrafeei 624c8f2
Tweak test
lrafeei d4ebb13
Remove skip all test file
lrafeei 693c8c6
Fix syntax from rebase
lrafeei b7c8aae
Fix httplib test
lrafeei 0f17453
Fix Megalinter errors
lrafeei 36c4fa9
Remove commented out code
lrafeei 6fbfac4
Fix requests test
lrafeei 125cf1c
Rename cross_process_headers to distributed_tracing_headers
TimPansino b0a5032
Remove cross agent cat fixtures
hmstepanek 1a42b17
Add back tenr.apdexPerfZone as not CAT specific
hmstepanek 58b748b
Remove distributed_trace_key from header mixin
hmstepanek 4618058
Remove config instead of commenting out
hmstepanek 0175faa
Put back transactionGuid
hmstepanek dd197f1
Return None in process_response
hmstepanek 088a9ff
Still pass settings into finalize application settings call
hmstepanek 05fc6ea
DT_RESPONSE_CODE->RESPONSE_CODE
hmstepanek 2821057
respond_with_dt_header->response_handler
hmstepanek 500e2d0
Move codecov.yml file to .github folder (#1516)
TimPansino 58b1f12
Fixup: syntax error
hmstepanek 6e5cb42
Put back nr.guid if synthetics resource id
hmstepanek ab46644
Merge branch 'remove_CAT' of github.com:newrelic/newrelic-python-agen…
hmstepanek f0677f6
Trigger tests
hmstepanek a0879f5
Remove corresponding config call
hmstepanek 144e52e
Fixup: spacing
hmstepanek 1812a9e
Fixup
hmstepanek 9e94916
Trigger tests
hmstepanek ad8d6fa
Merge branch 'main' into remove_CAT
mergify[bot] d51924b
Merge ad8d6fa9d5f827c1229a781d8d3e8702a47ac298 into baecae80c203a991d…
lrafeei 2882b03
[MegaLinter] Apply linters fixes
mergify[bot] f029733
Merge branch 'main' into remove_CAT
mergify[bot] 950410c
Merge branch 'main' into remove_CAT
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2010 New Relic, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# HeaderMixin assumes the mixin class also inherits from TimeTrace | ||
class HeaderMixin: | ||
synthetics_key = "X-NewRelic-Synthetics" | ||
synthetics_info_key = "X-NewRelic-Synthetics-Info" | ||
distributed_trace_key = "newrelic" | ||
settings = None | ||
|
||
def __enter__(self): | ||
result = super().__enter__() | ||
if result is self and self.transaction: | ||
self.settings = self.transaction.settings or None | ||
return result | ||
|
||
@classmethod | ||
def generate_request_headers(cls, transaction): | ||
""" | ||
Return a list of NewRelic specific headers as tuples | ||
[(HEADER_NAME0, HEADER_VALUE0), (HEADER_NAME1, HEADER_VALUE1)] | ||
|
||
""" | ||
|
||
if transaction is None or transaction.settings is None: | ||
return [] | ||
|
||
settings = transaction.settings | ||
|
||
nr_headers = [] | ||
|
||
if settings.distributed_tracing.enabled: | ||
transaction.insert_distributed_trace_headers(nr_headers) | ||
|
||
if transaction.synthetics_header: | ||
nr_headers.append((cls.synthetics_key, transaction.synthetics_header)) | ||
if transaction.synthetics_info_header: | ||
nr_headers.append((cls.synthetics_info_key, transaction.synthetics_info_header)) | ||
|
||
return nr_headers |
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.