nix icon indicating copy to clipboard operation
nix copied to clipboard

Track parsing and evaluation activities

Open jfroche opened this issue 3 years ago • 6 comments

Enable better instrumentation of the steps before the drv building step

We are working on nix-otel which instrument the nix code through a plugin to send trace using the OpenTelemetry protocol. The precision of the trace data is directly related to the amount of activity we have. As such, logging these activities during the execution of nix-build and nix build would be highly beneficial in improving the accuracy of the traces that we can generate.

jfroche avatar Nov 01 '22 00:11 jfroche

Should I create new ActivityType ?

jfroche avatar Nov 01 '22 00:11 jfroche

Triaged in the Nix team meeting 2023-03-23:

@jfroche we're not sure about the exact purpose and use case of logging these activities. Could you please elaborate in the PR description and ping me to put it back on the agenda once there is more information for us to work with?

fricklerhandwerk avatar Mar 27 '23 13:03 fricklerhandwerk

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-03-23-nix-team-meeting-minutes-43/26758/1

nixos-discourse avatar Mar 27 '23 13:03 nixos-discourse

Triaged in the Nix team meeting 2023-03-23:

@jfroche we're not sure about the exact purpose and use case of logging these activities. Could you please elaborate in the PR description and ping me to put it back on the agenda once there is more information for us to work with?

@fricklerhandwerk does this new description helps ?

jfroche avatar Mar 27 '23 22:03 jfroche

Discussed in the Nix team meeting 2023-04-03:

While we wouldn't want to add this to the stable interface yet, we're inclined to merge something in that direction in order to try it out. There was no decision on how to proceed, though.

Complete discussion
  • We certainly aren't committing to these being stable, but we might be able to try it out by merging something.
  • We perhaps needs a more general function tracing mechanism
  • The activities are wrong, as they are named after things that run interleaved
    • (nothing was recorded as to what would be better)
  • Perhaps the stats in EvalState are suitable for gathering accumulated time spent on e.g. the insertion of .drv files into the store

fricklerhandwerk avatar Apr 05 '23 10:04 fricklerhandwerk

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-04-03-nix-team-meeting-minutes-46/27008/1

nixos-discourse avatar Apr 05 '23 11:04 nixos-discourse

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-10-16-nix-team-meeting-minutes-187/54835/1

nixos-discourse avatar Oct 23 '24 19:10 nixos-discourse