[Unreal] Add transaction and span set_data documentation#14599
Merged
[Unreal] Add transaction and span set_data documentation#14599
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will increase total bundle size by 1.09kB (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
view changes for bundle: sentry-docs-server-cjsAssets Changed:
|
Comment on lines
+10
to
+14
| transaction->SetData(TEXT("key"), {{TEXT("data_key1"), TEXT("value")}}); | ||
| transaction->SetData(TEXT("key"), {{TEXT("data_key2"), 123}}); | ||
| transaction->SetData(TEXT("key"), {{TEXT("data_key3"), 123.456f}}); | ||
| transaction->SetData(TEXT("key"), {{TEXT("data_key4"), TArray<FSentryVariant>{{123, 456}}}}); | ||
| transaction->SetData(TEXT("key"), {{TEXT("data_key5"), TMap<FString, FSentryVariant>{{TEXT("inner_key1"), 123}}}}); |
Contributor
There was a problem hiding this comment.
Potential bug: The Unreal `SetData` documentation example incorrectly uses the same key for multiple calls, which will cause data to be overwritten, with only the last value being saved.
- Description: The code examples for
SetDatain the Unreal documentation repeatedly use the same key,TEXT("key"), for multiple calls. Standard key-value map behavior, which Unreal'sTMapfollows, dictates that using the same key overwrites the previous value. Consequently, if a user implements this example, only the data from the finalSetDatacall will be preserved on the transaction, and all previously set attributes will be lost. This contradicts the documentation's stated goal of demonstrating how to add multiple, queryable data attributes and is inconsistent with examples for all other Sentry SDKs. - Suggested fix: Update the code examples in the documentation to use a unique key for each
SetDatacall. For instance, use keys likeTEXT("data_key1"),TEXT("data_key2"), etc., to align with the intended functionality and the pattern established in other Sentry SDK documentation.
severity: 0.45, confidence: 0.98
Did we get this right? 👍 / 👎 to inform future reviews.
cleptric
approved these changes
Aug 11, 2025
bitsandfoxes
approved these changes
Aug 11, 2025
Contributor
bitsandfoxes
left a comment
There was a problem hiding this comment.
I'd change the TEXT("key") so the snippet isn't overwriting the data and to avoid copy-pasta user confusion. LGTM!
codyde
added a commit
that referenced
this pull request
Aug 13, 2025
* 'master' of https://github.com/getsentry/sentry-docs: (22 commits) Fix incorrectly placed comma (#14592) fix(devservices): Typo in devservices docs (#14636) ref(ourlogs): Add log size limit (#14635) Document undocumented php prefix option (#14634) getsentry/relay@7958273 Unreal Engine: Update plugin docs (#14624) feat: Update min js sdk version for logging and update console logging snippet (#14614) feat: [Unreal] Add transaction and span set_data documentation (#14599) feat(js): Add `ignoreSpans` documentation to Options page (#14572) fix(js/browser): Amend user IP + `sendDefaultPii` change to v10 migration guide (#14609) fix: Fix broken AI banner due to invalid syntax (#14627) feat(partners)add-enablement-docs (#14095) Fix image path issue & add test coverage for new lightbox (#14616) feat(seer): update GHE setup to work with seer (#14617) fix(replay): Document searchable properties `screen` and alias `screens` (#14603) Update image handling (#14564) Update using-hooks.mdx (#14605) Godot: Document `disabled-in-editor-play` option (#14438) fix(Docs) redirect and deprecate old metrics pages (#14602) fix(relay): Update projects.mdx (#14606) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview: https://sentry-docs-git-unreal-attach-data.sentry.dev/platforms/unreal/tracing/instrumentation/custom-instrumentation/
DESCRIBE YOUR PR
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES