-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional opentelemetry file export tracing #723
Conversation
@joshwlewis It looks like there were new versions of the opentelemetry crates released in the last couple of days: Maybe worth picking those new versions up now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have one remaining comment. I think the proposed changes aren't too controversial so I'm approving already with the expectation that we resolve the comment before merging. :)
As of the Cargo included in Rust 1.74, lints can now be configured in `Cargo.toml` across whole crates/workspaces: https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-lints-section https://doc.rust-lang.org/stable/cargo/reference/workspaces.html#the-lints-table This reduces the boilerplate, and chance that we forget to enable lints in some targets. The only thing we need to remember is to add the `[lints] workspace = true` to any new crates in the future. Making this switch exposed a few places where lints weren't enabled and issues had been missed, eg: #746 Since this feature requires Rust 1.74, the MSRV has also been bumped. (Though we will have had to do so soon anyway to be able to start using `Result::inspect_err`, which is due in Rust 1.76, xref: #723 (comment)) GUS-W-14511805.
65e851e
to
5b911db
Compare
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great - thank you so much for working on this! I can't wait to start using this in the CNBs themselves :-)
This enables `libcnb`'s `trace` feature, which means traces, spans, and events are written to OpenTelemetry export files on disk in the ephemeral build container, which can then be read by the Heroku build system or when debugging locally with Pack (so long as a suitable `--volume` mount has been configured). See: heroku/libcnb.rs#723 GUS-W-15108954.
Removes the otel tracing added in [#652](#652) which was introduced before the `libcnb` tracing support in [heroku/libcnb.rs#723](heroku/libcnb.rs#723). This is also blocking the dependency updates in [#942](#942).
Removes the otel tracing added in [#652](#652) in favor of the `libcnb` tracing support added in [heroku/libcnb.rs#723](heroku/libcnb.rs#723).
* Use the tracing features provided by `libcnb` Removes the otel tracing added in [#652](#652) in favor of the `libcnb` tracing support added in [heroku/libcnb.rs#723](heroku/libcnb.rs#723). * Update CHANGELOG.md * Update buildpacks/nodejs-corepack/CHANGELOG.md Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com> --------- Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
This is an alternative implementation of #705.
This PR adds opt-in functionality (with the
trace
feature) that writes OpenTelemetry File Export tracing information during build and compile. The tracing data includes buildpack attributes (like buildpack id, name), spans for build and detect, events forbuild-success
,detect-pass
,detect-fail
, and also sets errors and span status in the case of errors.GUS-W-14348835.