Custom transaction are not sent? #2588
Unanswered
BarbecueSilver
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The same thing happened when I try to put a custom timestamp on a transaction and/or span const transactionStartTimeStamp = (new Date()).getTime();
// functionCallX
const spanStartTimeStamp = (new Date()).getTime();
// functionCallX-Y
const spanEndTimeStamp = (new Date()).getTime();
const transactionEndTimeStamp = (new Date()).getTime();
const transaction = Sentry.startTransaction({
name: "test-transaction",
op: "functionX",
startTimestamp: transactionStartTimeStamp,
});
const span = transaction.startChild({
op: "functionX-Y",
startTimestamp: spanStartTimeStamp,
});
span.finish(spanEndTimeStamp);
transaction.finish(transactionEndTimeStamp); When the log activates, it will log both the start & finishing event. (property) SpanContext.startTimestamp?: number | undefined
/// Timestamp in seconds (epoch time) indicating when the span started. And so the param when finish called. (method) Span.finish(endTimestamp?: number | undefined): void
/// Sets the finish timestamp on the current span.
///
/// @param endTimestamp — Takes an endTimestamp if the end should not be the time when you call this function. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hej there!
Thanks for your project and the effort.
I just encountered, that following your documentation (Performance, Custom Transaction) will not lead to a sent Transaction at all.
It is stated in the Custom Instrumentation part as first example:
We do not receive any Transaction to our Sentry project with this code. No worries, I set
tracesSampleRate
to1
for testing purposes 👍I just received this in our console:
I dig around and found that maybe the property
op
was missing instartTransaction
.Indeed! After adding it, we finally received the Transaction in our Sentry project 🎉
Now I am asking myself:
Is it sent but not shown in the project?
Is this is a bug? (because
op
isundefined
; a bug on the sentry page or in ReactNative package)Missing documentation? (
op
might be mandatory ontransaction
)Shall I open an issue for it? (I will! just let me know 👍 )
Beta Was this translation helpful? Give feedback.
All reactions