IP Library › Granted Patent US 11,586,525
Granted Patent B2
US 11,586,525 · App. 17/339,673 · Granted Feb 21, 2023

Automatic span context propagation to worker threads in rich-client applications

Inventors: Kevin J. Cirone (Woburn, MA); Blake T. Sullivan (Redwood City, CA); Dipankar Bajpai (Chelmsford, MA)
Assignee: Oracle International Corporation
G06F11/3476G06F9/542G06F11/3636G06F12/0802G06F2212/60
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,586,525
App. No.
17/339,673
Granted
Feb 21, 2023
Kind
B2
Abstract

Disclosed techniques relate to tracing a subsidiary thread of a web page application. In an example, a method includes providing a web page application to a web browser. The method further includes creating, from the web page application, a global tracer configured to log tracing data for the web page application and a span. The method further includes instantiating, from the web page application, a wrapper for a subsidiary thread. The wrapper is configured to execute shim code before executing the subsidiary thread. The method further includes passing, from the wrapper to the shim code, configuration data of the global tracer. The method further includes creating a subsidiary tracer from the shim code and the configuration data. The subsidiary tracer configured to log tracing data for the subsidiary thread and a thread span.

Claims (78)

1. A method of tracing a subsidiary thread of a web page application, the method comprising:

providing a web page application to a web browser on a client device;

creating, from the web page application, a global tracer configured to log tracing data for the web page application and a span, wherein the span represents one or more of: (i) a number of processing cycles corresponding to an execution of operations corresponding to the web page application or (ii) an execution time of the operations corresponding to the web page application;

instantiating, from the web page application, a wrapper for a subsidiary thread, the wrapper configured to execute shim code before executing the subsidiary thread;

passing, from the wrapper to the shim code, configuration data of the global tracer; and

creating, from the shim code and the configuration data, a subsidiary tracer, the subsidiary tracer configured to log tracing data for the subsidiary thread and a thread span that represents one or more of (i) a number of processing cycles corresponding to an execution of operations corresponding to the subsidiary thread or (ii) an execution time of the operations corresponding to the subsidiary thread.

2. The method of claim 1 , further comprising:

automatically logging a start of the thread span;

executing, via the shim code, the operations corresponding to the subsidiary thread;

automatically logging an end of the thread span based upon a completion of the operations corresponding to the subsidiary thread; and

returning the thread span via the shim code to the wrapper.

3. The method of claim 2 , further comprising:

automatically logging a start of the span;

executing the operations corresponding to the web page application;

automatically logging an end of the span based upon a completion of the operations corresponding to the web page application; and

associating the span and the thread span as a hierarchy.

4. The method of claim 1 , further comprising:

sending, from the web page application via wrapper to the subsidiary tracer, a first message; and

receiving, from the subsidiary tracer and the wrapper, a second message generated by the subsidiary thread in response to the first message.

5. The method of claim 1 , further comprising:

determining a successful completion of the subsidiary thread; and

returning an indication of the successful completion of the subsidiary thread via the shim code to the wrapper responsive to determining the successful completion.

6. The method of claim 1 , wherein the web page application includes JavaScript and the subsidiary thread is a web worker thread.

7. The method of claim 1 , further comprising:

detecting an event initiated by interaction with the web page application, wherein the thread span represents determining an action to perform based on the event; and

executing the operations corresponding to the subsidiary thread occurs responsive to detecting the event, wherein the operations corresponding to the subsidiary thread implement the action.

8. The method of claim 1 , further comprising:

accessing a priority for the span;

determining that the priority is outside a priority tolerance; and

based on determining that the priority is outside a priority tolerance, identifying the span as a proxy span, wherein identifying the span as the proxy span causes the global tracer to not log information based on the execution of the operations corresponding to the web page application.

9. The method of claim 1 , wherein the global tracer is configured to execute on a main browser thread.

10. A system comprising:

a non-transitory computer-readable medium storing computer-executable program instructions; and

at least one processor communicatively coupled to the non-transitory computer-readable medium and executing the computer-executable program instructions for:

providing a web page application to a web browser on a client device;

creating, from the web page application, a global tracer configured to log tracing data for the web page application and a span, wherein the span represents one or more of: (i) a number of processing cycles corresponding to an execution of operations corresponding to the web page application or (ii) an execution time of the operations corresponding to the web page application;

instantiating, from the web page application, a wrapper for a subsidiary thread, the wrapper configured to execute shim code before executing the subsidiary thread;

passing, from the wrapper to the shim code, configuration data of the global tracer; and

creating, from the shim code and the configuration data, a subsidiary tracer, the subsidiary tracer configured to log tracing data for the subsidiary thread and a thread span that represents one or more of (i) a number of processing cycles corresponding to an execution of operations corresponding to the subsidiary thread or (ii) an execution time of the operations corresponding to the subsidiary thread.

11. The system of claim 10 , wherein the computer-executable program instructions further comprise instructions for:

automatically logging a start of the thread span;

executing, via the shim code, the operations corresponding to the subsidiary thread;

automatically logging an end of the thread span based upon a completion of the operations corresponding to the subsidiary thread; and

returning the thread span via the shim code to the wrapper.

12. The system of claim 11 , wherein the computer-executable program instructions further comprise instructions for:

automatically logging a start of the span;

executing the operations corresponding to the web page application;

automatically logging an end of the span based upon a completion of the operations corresponding to the web page application; and

associating the span and the thread span as a hierarchy.

13. The system of claim 10 , wherein the computer-executable program instructions further comprise instructions for:

sending, from the web page application via wrapper to the subsidiary tracer, a first message; and

receiving, from the subsidiary tracer and the wrapper, a second message generated by the subsidiary thread in response to the first message.

14. The system of claim 10 , wherein the computer-executable program instructions further comprise instructions for:

determining a successful completion of the subsidiary thread; and

returning an indication of the successful completion of the subsidiary thread via the shim code to the wrapper responsive to determining the successful completion.

15. The system of claim 10 , wherein the web page application includes JavaScript and the subsidiary thread is a web worker thread.

16. A non-transitory computer-readable medium storing computer-executable program instructions that when executed by a processor, perform operations comprising:

providing a web page application to a web browser on a client device;

creating, from the web page application, a global tracer configured to log tracing data for the web page application and a span, wherein the span represents one or more of: (i) a number of processing cycles corresponding to an execution of operations corresponding to the web page application or (ii) an execution time of the operations corresponding to the web page application;

instantiating, from the web page application, a wrapper for a subsidiary thread, the wrapper configured to execute shim code before executing the subsidiary thread;

passing, from the wrapper to the shim code, configuration data of the global tracer; and

creating, from the shim code and the configuration data, a subsidiary tracer, the subsidiary tracer configured to log tracing data for the subsidiary thread and a thread span that represents one or more of (i) a number of processing cycles corresponding to an execution of operations corresponding to the subsidiary thread or (ii) an execution time of the operations corresponding to the subsidiary thread.

17. The non-transitory computer-readable medium of claim 16 , wherein the operations further comprise:

automatically logging a start of the thread span;

executing, via the shim code, the operations corresponding to the subsidiary thread;

automatically logging an end of the thread span based upon a completion of the operations corresponding to the subsidiary thread; and

returning the thread span via the shim code to the wrapper.

18. The non-transitory computer-readable medium of claim 17 , wherein the operations further comprise:

automatically logging a start of the span;

executing the operations corresponding to the web page application;

automatically logging an end of the span based upon a completion of the operations corresponding to the web page application; and

associating the span and the thread span as a hierarchy.

19. The non-transitory computer-readable medium of claim 16 , wherein the operations further comprise:

sending, from the web page application via wrapper to the subsidiary tracer, a first message; and

receiving, from the subsidiary tracer and the wrapper, a second message generated by the subsidiary thread in response to the first message.

20. The non-transitory computer-readable medium of claim 16 , wherein the operations further comprise:

determining a successful completion of the subsidiary thread; and

returning an indication of the successful completion of the subsidiary thread via the shim code to the wrapper responsive to determining the successful completion.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 10, 2021
From: CIRONE, KEVIN J.; SULLIVAN, BLAKE T.; BAJPAI, DIPANKAR
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 056503/0763 →
Continuity (2)
Provisional Application 63077649 · Sep 13, 2020
Related Publication 20220083447A1 · Mar 17, 2022
Cited By (1)
US 12,367,126