-
Notifications
You must be signed in to change notification settings - Fork 107
Python Worker Extension Interface (worker) #815
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
24d24d9
Add extnesion manager
cb8624c
Added essentials tests
f98d554
Add unittest cases
cf76c92
Report extension list on function load
1c8f136
Merge branch 'dev' into hazeng/extension-wrk
Hazhzeng 6d184e5
Use aio_compat to ensure test cases work on Python 3.6
0f547d0
Merge branch 'hazeng/extension-wrk' of https://github.com/Azure/azure…
4de876a
Address PR issues
a079651
Make unnecessary exposed interfaces to private
c52fc42
Update names
70f8a78
Address PR issues
606cd83
Address PR issues
aba4efb
Restore azure.functions module after loading from sys.path
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 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
__version__ = '1.1.10' |
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 |
---|---|---|
@@ -1,23 +1,44 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
from typing import Dict | ||
|
||
|
||
class TraceContext: | ||
"""Check https://www.w3.org/TR/trace-context/ for more information""" | ||
|
||
def __init__(self, trace_parent: str, | ||
trace_state: str, attributes: dict) -> None: | ||
trace_state: str, attributes: Dict[str, str]) -> None: | ||
self.__trace_parent = trace_parent | ||
self.__trace_state = trace_state | ||
self.__attributes = attributes | ||
|
||
@property | ||
def Tracestate(self) -> str: | ||
"""Get trace state from trace-context (deprecated).""" | ||
return self.__trace_state | ||
|
||
@property | ||
def Traceparent(self) -> str: | ||
"""Get trace parent from trace-context (deprecated).""" | ||
return self.__trace_parent | ||
|
||
@property | ||
def Attributes(self) -> Dict[str, str]: | ||
"""Get trace-context attributes (deprecated).""" | ||
return self.__attributes | ||
|
||
@property | ||
def trace_state(self) -> str: | ||
"""Get trace state from trace-context""" | ||
return self.__trace_state | ||
|
||
@property | ||
def trace_parent(self) -> str: | ||
"""Get trace parent from trace-context""" | ||
return self.__trace_parent | ||
|
||
@property | ||
def Attributes(self) -> str: | ||
def attributes(self) -> Dict[str, str]: | ||
"""Get trace-context attributes""" | ||
return self.__attributes |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.