hash icon indicating copy to clipboard operation
hash copied to clipboard

H-4824: Update sentry-rust monorepo to v0.40.0

Open hash-worker[bot] opened this issue 9 months ago • 4 comments

This PR contains the following updates:

Package Type Update Change
sentry (source) workspace.dependencies minor =0.37.0 -> =0.40.0
sentry-types (source) workspace.dependencies minor =0.37.0 -> =0.40.0

[!WARNING] Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

getsentry/sentry-rust (sentry)

v0.40.0

Compare Source

Breaking changes
  • refactor(logs): apply user attributes to log regardless of send_default_pii (#​843) by @​lcian
    • User attributes should be applied to logs regardless of send_default_pii. Therefore, that parameter was removed from sentry_core::Scope::apply_to_log.
Features
  • feat(tracing): add support for logs (#​840) by @​lcian
    • To capture tracing events as Sentry structured logs, enable the logs feature of the sentry crate.
    • Then, initialize the SDK with enable_logs: true in your client options.
    • Finally, set up a custom event filter to map events to logs based on criteria such as severity. For example:
        let sentry_layer = sentry_tracing::layer().event_filter(|md| match *md.level() {
            tracing::Level::ERROR => EventFilter::Event,
            tracing::Level::TRACE => EventFilter::Ignore,
            _ => EventFilter::Log,
        });
    
  • feat(log): add support for logs (#​841) by @​lcian
    • To capture log records as Sentry structured logs, enable the logs feature of the sentry crate.
    • Then, initialize the SDK with enable_logs: true in your client options.
    • Finally, set up a custom event filter to map records to Sentry logs based on criteria such as severity. For example:
        let logger = sentry::integrations::log::SentryLogger::new().filter(|md| match md.level() {
            log::Level::Error => LogFilter::Event,
            log::Level::Trace => LogFilter::Ignore,
            _ => LogFilter::Log,
        });
    
  • refactor(logs): cache default attributes and add OS attributes (#​842) by @​lcian
    • os.name and os.version are now being attached to logs as default attributes.
Fixes
Behavioral changes
  • refactor(tracing): refactor internal code and improve docs (#​839) by @​lcian
    • Errors carried by breadcrumbs will now be stored in the breadcrumb data under their original field name.
    • Before, they were all stored under a single key called errors.
Dependencies

v0.39.0

Compare Source

Features

Support for Sentry structured logs has been added to the SDK.

  • To set up logs, enable the logs feature of the sentry crate and set enable_logs to true in your client options.

  • Then, use the logger_trace!, logger_debug!, logger_info!, logger_warn!, logger_error! and logger_fatal! macros to capture logs.

  • To filter or update logs before they are sent, you can use the before_send_log client option.

  • Please note that breaking changes could occur until the API is finalized.

  • feat(logs): add log protocol types (#​821) by @​lcian

  • feat(logs): add ability to capture and send logs (#​823) by @​lcian & @​Swatinem

  • feat(logs): add macro-based API (#​827) by @​lcian & @​szokeasaurusrex

  • feat(logs): send logs in batches (#​831) by @​lcian

Behavioral changes
  • feat(core): implement Tracing without Performance (#​811) by @​lcian
    • The SDK now implements Tracing without Performance, which makes it so that each Scope is associated with an object holding some tracing information.
    • This information is used as a fallback when capturing an event with tracing disabled or otherwise no ongoing span, to still allow related events to be linked by a trace.
    • A new API Scope::iter_trace_propagation_headers has been provided that will use the fallback tracing information if there is no current Span on the Scope.
Breaking changes
  • refactor: remove debug-logs feature (#​820) by @​lcian
    • The deprecated debug-logs feature of the sentry crate, used for the SDK's own internal logging, has been removed.

v0.38.1

Compare Source

Fixes
  • build: include sentry-actix optionally when release-health is enabled (#​806) by @​lcian
    • sentry-actix is now being included as a dependency only when explicitly added, either as a direct dependency or through the actix feature flag of the sentry crate.
    • Due to a mistake in the Cargo.toml, it was previously being included as a dependency by default when using just the sentry crate with default features.

v0.38.0

Compare Source

OpenTelemetry integration

An OpenTelemetry integration has been released. Please refer to the changelog entry below for the details.

Breaking changes
  • refactor(tracing): remove EventFilter::exception and always attach exception (#​768) by @​lcian
    • The EventFilter::Exception enum variant has been removed. Please use EventFilter::Event instead to achieve the same behavior.
    • Using EventFilter::Event will always attach any error struct used within the error field passed to the tracing macro, as EventFilter::Exception did previously.
    • The error field will also be attached to breadcrumbs as an errors field resembling the structure of Sentry events created from error structs.
  • fix: use release-health flag in sentry-actix and remove it from subcrates where unneeded (#​787) by @​lcian
    • As a follow-up from the changes in the previous release, the ClientOptions fields auto_session_tracking and session_mode are now gated behind the release-health feature flag of the sentry crate.
    • If you depend on sentry with default-features = false, you need to include the release-health feature flag to benefit from the Release Health features of Sentry and have access to the aforementioned client options.
    • The release-health feature flag is used correctly in sentry-actix to enable compilation of that subcrate when it's disabled.
    • The release-health has been removed from the sentry-tracing and sentry-tower subcrates, where it was unnecessary.
  • refactor: remove Surf transport (#​766) by @​lcian
    • The Surf transport has been removed as the surf crate is unmaintained and it was holding back dependency upgrades.
    • If you really want to still use Surf, you can define a custom TransportFactory and pass it as the transport in your ClientOptions
Behavioral changes
  • refactor: honor send_default_pii in sentry-actix and sentry-tower (#​771) by @​lcian
    • The client option send_default_pii (disabled by default) is now honored by sentry-actix and sentry-tower.
    • This means that potentially sensitive headers such as authorization, cookies, and those that usually contain the user's IP address are filtered and not sent to Sentry.
    • If you want to get back to the previous behavior and capture all headers, please set send_default_pii to true in your ClientOptions.
    • Please refer to our Data Collected page for a comprehensive view of the data collected by the SDK.
  • refactor(debug-images): force init DEBUG_META on integration init (#​773) by @​lcian
    • The DebugImages integration has been updated to init the DEBUG_META Lazy immediately.
    • Using this integration is known to cause issues in specific versions of the Linux kernel due to issues in a library it depends on.
    • Previously, on problematic systems the SDK would cause deadlock after capturing the first event. Now the SDK will panic on initialization instead. Please open an issue if you're affected.
Features
  • feat(otel): add OpenTelemetry SpanProcessor, Propagator, Extractor (#​779) by @​lcian
    • A new integration for the opentelemetry crate has been released.
    • It can be used to capture spans created using the opentelemetry API and send them to Sentry.
    • Distributed tracing is also supported, provided that the upstream/downstream services support the Sentry or W3C distributed tracing metadata format.
    • Please refer to the subcrate's README or the crate docs to see an example of setup and usage.
  • feat: expose sentry-actix as a feature of sentry (#​788) by @​lcian
    • sentry-actix is now exposed by the sentry crate as sentry::integrations::actix, gated behind the actix feature flag.
    • Please update your dependencies to not depend on the sentry-actix subcrate directly.
Dependencies
Various fixes & improvements

Configuration

📅 Schedule: Branch creation - "before 4am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • [ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

hash-worker[bot] avatar May 10 '25 03:05 hash-worker[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 53.30%. Comparing base (decf570) to head (bc81d41). Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7126      +/-   ##
==========================================
- Coverage   53.32%   53.30%   -0.03%     
==========================================
  Files        1081     1081              
  Lines       93826    93873      +47     
  Branches     4433     4433              
==========================================
- Hits        50037    50035       -2     
- Misses      42842    42892      +50     
+ Partials      947      946       -1     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.32% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system 35.85% <ø> (ø)
local.harpc-client 50.93% <ø> (ø)
local.hash-backend-utils 3.69% <ø> (ø)
local.hash-graph-sdk 0.00% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.antsi 0.00% <ø> (ø)
rust.deer 74.75% <ø> (ø)
rust.error-stack 89.07% <ø> (ø)
rust.harpc-codec 84.97% <ø> (ø)
rust.harpc-net 95.86% <ø> (-0.04%) :arrow_down:
rust.harpc-tower 66.34% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 91.62% <ø> (ø)
rust.hash-codec 75.38% <ø> (ø)
rust.hash-graph-api 5.04% <ø> (ø)
rust.hash-graph-authorization 28.84% <ø> (ø)
rust.hash-graph-store 27.99% <ø> (ø)
rust.hash-graph-temporal-versioning 48.22% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 83.30% <ø> (ø)
rust.hashql-ast 85.76% <ø> (ø)
rust.hashql-compiletest 52.45% <ø> (-1.85%) :arrow_down:
rust.hashql-core 82.21% <ø> (ø)
rust.hashql-diagnostics 50.24% <ø> (ø)
rust.hashql-hir 79.95% <ø> (ø)
rust.hashql-syntax-jexpr 94.10% <ø> (ø)
rust.sarif 97.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar May 13 '25 08:05 codecov[bot]

Once https://github.com/hashintel/hash/pull/7452 merges (or alongside), do we want to take a look at this again @TimDiekmann so it's also up-to-date?

vilkinsons avatar Jun 19 '25 08:06 vilkinsons

Yes, I will take a look at this. I would do it as a follow-up of #7452 as, except they communicate with sentry, there should be no connection between the PRs.

TimDiekmann avatar Jun 19 '25 08:06 TimDiekmann

I created H-4824 to track this.

TimDiekmann avatar Jun 19 '25 08:06 TimDiekmann

Superseded by #7480

TimDiekmann avatar Jun 22 '25 21:06 TimDiekmann