-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from mathworks/autotrace
Add getCurrentSpan and fix a bug in extractSpan
- Loading branch information
Showing
6 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 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 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,14 @@ | ||
function sp = getCurrentSpan() | ||
% Retrieve the current span | ||
% SP = OPENTELEMETRY.TRACE.GETCURRENTSPAN() returns the current span. | ||
% If there is not current span, SP will be an invalid span with all-zero | ||
% trace and span IDs. | ||
% | ||
% See also OPENTELEMETRY.TRACE.SPAN, | ||
% OPENTELEMETRY.CONTEXT.GETCURRENTCONTEXT | ||
% OPENTELEMETRY.TRACE.CONTEXT.EXTRACTSPAN | ||
|
||
% Copyright 2024 The MathWorks, Inc. | ||
|
||
ctx = opentelemetry.context.getCurrentContext; | ||
sp = opentelemetry.trace.Context.extractSpan(ctx); |
This file contains 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 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 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