KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.44k stars 190 forks source link

BuildEventContext.ProjectInstanceId and BuildEventContext.BuildRequestId should be exposed from the TimedNode model objects #553

Open MarkKharitonov opened 2 years ago

MarkKharitonov commented 2 years ago

Suppose I would like to build the trace view of the project build events using the approach of https://github.com/rainersigwald/TraceEventLogger/blob/master/TraceEventLogger/TraceEventLogger.cs.

In this case we need 3 properties from BuildEventContext:

  1. NodeId - already exposed
  2. ProjectInstanceId
  3. BuildRequestId

It is not clear how to build the trace events without them.

KirillOsenkov commented 2 years ago

Did you see the new horizontal Tracing view added in 2.1.596?

https://twitter.com/KirillOsenkov/status/1475562239901925378

MarkKharitonov commented 2 years ago

Yes, I did and it looks very promising. But it is the first version and it is likely to take time until it matures.

In the meantime I think it is useful to allow 3rd party to build custom tracing logic.