Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

methods(Access = protected)
function runBuild(plugin, pluginData)
% Warn users that tasks on workers will not emit telemetry data
% if a pool is open.
%
% Imperfect detection of parallel builds but
% the impact of a false positive is very low
p = gcp("nocreate");
if ~isempty(p)
warning("opentelemetry:buildtool:OpenTelemetryPlugin:NoParallelEmit", ...
"Tasks executed on parallel workers do not emit telemetry data.");
end

% Configure by attaching to span if passed in via environment
% variable, and propagating baggage
configureOTel();
Expand Down Expand Up @@ -56,10 +67,6 @@ function runBuild(plugin, pluginData)
end

function runTask(plugin, pluginData)
% TODO:
% - buildtool.task.outputs
% - buildtool.task.inputs

% Definitions
task = pluginData.TaskGraph.Tasks;
taskName = pluginData.Name;
Expand Down Expand Up @@ -187,4 +194,4 @@ function cleanupOTel(span)
otellp = opentelemetry.logs.Provider.getLoggerProvider;
opentelemetry.sdk.common.Cleanup.forceFlush(otellp, timeout);
opentelemetry.sdk.common.Cleanup.shutdown(otellp);
end
end
Loading