Skip to content

Add Metrics API support#1214

Merged
tustanivsky merged 42 commits intomainfrom
feat/metrics
Feb 9, 2026
Merged

Add Metrics API support#1214
tustanivsky merged 42 commits intomainfrom
feat/metrics

Conversation

@tustanivsky
Copy link
Copy Markdown
Collaborator

@tustanivsky tustanivsky commented Feb 2, 2026

This PR adds Sentry Metrics API support to the Unreal plugin with three metric types: counter, distribution and gauge.

Closes #1213

Key changes

  • Add AddCount, AddDistribution and AddGauge functions to Sentry subsystem interface along with their overloads that allow setting custom metric attributes
  • Add FSentryMeasurementUnit struct for type-safe unit specification in Blueprints, covering duration, information, fraction and custom units
  • Add USentryMetric data class allowing to read/write individual metric item properties (value, type, unit, attributes)
  • Add USentryBeforeMetricHandler hook to filter/edit metrics before sending them to Sentry
  • Add unit tests covering USentryMetric and USentryBeforeMetricHandler functionality
  • Update sample app to manually test metrics capturing

Platform support

  • Windows/Linux
  • Android
  • Mac/iOS (not available due to current Cocoa SDK limitations)
  • Consoles (will be addressed via separate PRs in plugin extension repos)

Related items

Documentation

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Internal Changes 🔧

Deps

  • Update Java SDK to v8.32.0 by github-actions in #1220
  • Update CLI to v3.2.0 by github-actions in #1221
  • Update Native SDK to v0.12.6 by github-actions in #1219
  • Update Cocoa SDK to v9.4.0 by github-actions in #1218

Other

  • Add Metrics API support by tustanivsky in #1214
  • Add Metrics API support by tustanivsky in #1214

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 4f6a68d

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Copy Markdown
Collaborator

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the API use doubles rather than floats?

Integers should be a 64-bit signed integer, while doubles should be a 64-bit floating point number.

https://develop.sentry.dev/sdk/telemetry/metrics/

@tustanivsky
Copy link
Copy Markdown
Collaborator Author

Should the API use doubles rather than floats?

Unreal Blueprints do not support the double type so we currently use float across all functions where decimal values are expected.

@tustanivsky tustanivsky merged commit ac9cf4b into main Feb 9, 2026
59 checks passed
@tustanivsky tustanivsky deleted the feat/metrics branch February 9, 2026 11:39
tustanivsky added a commit to getsentry/sentry-docs that referenced this pull request Feb 9, 2026
This PR adds documentation for the Sentry Metrics feature in the Unreal
Engine SDK.

Related to:
- getsentry/sentry-unreal#1214
jaffrepaul pushed a commit to getsentry/sentry-docs that referenced this pull request Feb 9, 2026
This PR adds documentation for the Sentry Metrics feature in the Unreal
Engine SDK.

Related to:
- getsentry/sentry-unreal#1214
@Maxmystere
Copy link
Copy Markdown
Contributor

Should the API use doubles rather than floats?

Unreal Blueprints do not support the double type so we currently use float across all functions where decimal values are expected.

To give more info on that, since UE5 blueprint is natively using double for it's floating value (even tho it's naming hasn't been changed)
Source :
1
2(FDoubleProperty)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentry Metrics for Unreal SDK

5 participants