Skip to content

Commit 1b7319e

Browse files
committed
Add warning for parallel builds
1 parent 691bae5 commit 1b7319e

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
methods(Access = protected)
66
function runBuild(plugin, pluginData)
7+
% Warn users that tasks on workers will not emit telemetry data
8+
% if a pool is open.
9+
%
10+
% Imperfect detection of parallel builds but
11+
% the impact of a false positive is very low
12+
p = gcp("nocreate");
13+
if ~isempty(p)
14+
warning("opentelemetry:buildtool:OpenTelemetryPlugin:NoParallelEmit", ...
15+
"Tasks run on parallel workers will not emit telemetry data");
16+
end
17+
718
% Configure by attaching to span if passed in via environment
819
% variable, and propagating baggage
920
configureOTel();
@@ -56,10 +67,6 @@ function runBuild(plugin, pluginData)
5667
end
5768

5869
function runTask(plugin, pluginData)
59-
% TODO:
60-
% - buildtool.task.outputs
61-
% - buildtool.task.inputs
62-
6370
% Definitions
6471
task = pluginData.TaskGraph.Tasks;
6572
taskName = pluginData.Name;

0 commit comments

Comments
 (0)