Skip to content

Commit df90996

Browse files
author
Sam Eagen
committed
Fix issue with PluginData.Tasks, remove unnecessary attributes
1 parent 20aa4ef commit df90996

2 files changed

Lines changed: 89 additions & 192 deletions

File tree

instrumentation/buildtool/+matlab/+buildtool/+plugins/OpenTelemetryPlugin.m

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,8 @@ function runBuild(plugin, pluginData)
88
% variable, and propagating baggage
99
configureOTel();
1010

11-
% Attributes
12-
otelAttributes = dictionary( ...
13-
[ ...
14-
"otel.library.name", ...
15-
"span.kind", ...
16-
"internal.span.format", ...
17-
], ...
18-
[ ...
19-
"buildtool", ...
20-
"internal", ...
21-
"proto", ...
22-
] ...
23-
);
24-
2511
tr = opentelemetry.trace.getTracer("buildtool");
26-
sp = tr.startSpan("buildtool", Attributes=otelAttributes);
12+
sp = tr.startSpan("buildtool");
2713
scope = makeCurrent(sp); %#ok<NASGU>
2814

2915
% Run build
@@ -75,22 +61,17 @@ function runTask(plugin, pluginData)
7561
% - buildtool.task.inputs
7662

7763
% Definitions
64+
task = pluginData.TaskGraph.Tasks;
7865
taskName = pluginData.Name;
79-
taskDescription = pluginData.Tasks.Description;
66+
taskDescription = task.Description;
8067

8168
% Attributes
8269
otelAttributes = dictionary( ...
8370
[ ...
84-
"otel.library.name", ...
85-
"span.kind", ...
86-
"internal.span.format", ...
8771
"buildtool.task.name", ...
8872
"buildtool.task.description", ...
8973
], ...
9074
[ ...
91-
taskName, ...
92-
"internal", ...
93-
"proto", ...
9475
taskName, ...
9576
taskDescription ...
9677
] ...

0 commit comments

Comments
 (0)