Skip to content
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

Enable logging from user threads #1171

Merged
merged 19 commits into from
Mar 3, 2023
Merged

Conversation

EvanR-Dev
Copy link
Contributor

@EvanR-Dev EvanR-Dev commented Feb 3, 2023

Description

Addresses #1158


Adds thread local storage to context to enable logging from user threads. Exposes it to user so that its invocation ID can be set to the context of the executing function. This means the thread local storage is in sync with the invocation ID of executed functions when set.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #1171 (da49b42) into dev (041fbce) will decrease coverage by 51.95%.
The diff coverage is 40.00%.

❗ Current head da49b42 differs from pull request most recent head 5dff325. Consider uploading reports for the commit 5dff325 to get more accurate results

@@             Coverage Diff             @@
##              dev    #1171       +/-   ##
===========================================
- Coverage   83.94%   32.00%   -51.95%     
===========================================
  Files          34       34               
  Lines        1893     1900        +7     
  Branches      365      366        +1     
===========================================
- Hits         1589      608      -981     
- Misses        233     1291     +1058     
+ Partials       71        1       -70     
Flag Coverage Δ
unittests 32.00% <40.00%> (-51.89%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
azure_functions_worker/dispatcher.py 19.54% <0.00%> (-69.52%) ⬇️
azure_functions_worker/bindings/context.py 60.00% <66.66%> (-27.50%) ⬇️
...e_functions_worker/bindings/nullable_converters.py 21.62% <0.00%> (-78.38%) ⬇️
azure_functions_worker/functions.py 25.00% <0.00%> (-71.28%) ⬇️
azure_functions_worker/utils/tracing.py 31.81% <0.00%> (-68.19%) ⬇️
azure_functions_worker/utils/common.py 33.33% <0.00%> (-66.67%) ⬇️
.../shared_memory_data_transfer/file_accessor_unix.py 19.60% <0.00%> (-57.85%) ⬇️
azure_functions_worker/bindings/meta.py 25.30% <0.00%> (-57.84%) ⬇️
...s/shared_memory_data_transfer/shared_memory_map.py 28.57% <0.00%> (-55.36%) ⬇️
... and 16 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@EvanR-Dev EvanR-Dev marked this pull request as ready for review February 6, 2023 17:19
@EvanR-Dev
Copy link
Contributor Author

@EvanR-Dev please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

@gavin-aguiar gavin-aguiar merged commit a0f3c77 into dev Mar 3, 2023
@gavin-aguiar gavin-aguiar deleted the evanroman/add-local-invocation-id branch March 3, 2023 20:04
@EvanR-Dev EvanR-Dev restored the evanroman/add-local-invocation-id branch March 31, 2023 04:48
@EvanR-Dev EvanR-Dev deleted the evanroman/add-local-invocation-id branch March 31, 2023 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants