Hello,
I am trying to send a custom event from my React-native application to the Dynatrace portal. I am using the dynatrace/react-native@2.323.1 plugin. My main objective is to log or capture the amount of times users visit a certain screen. The standard UserAction only displays which screen I want a little more information.
How I send the event (There is currently no UserAction going on that happend before):
<span>static </span><span>sendLog</span><span>(</span>log: <span>object</span><span>)</span>: <span>void </span><span>{<br></span> <span>Dynatrace</span>.<span>sendEvent</span><span>({ </span>...log, nothingToSeeTestField: 'Testvalue' <span>})</span>;<br><span>}</span>
I get the following logs when sending the event:
LOG [SendEventValidation]: modifyEvent({“body”:{“event”:“page_visit”,“pageName”:“Mijn Dossiers”,“pageKey”:“mijn-dossiers”,“timestamp”:1759144670432,“sessionId”:“session_1759144663479_3yj7cg6ns”,“platform”:“ios”,“previousPage”:“alle-dossiers”,“incidentCount”:0},“severityNumber”:9,“severityText”:“INFO”,“nothingToSeeTestField”:“nothingToSeeTestValue”})
LOG [SendEventValidation]: isKeyNameAllowed(): Filtering key body as this field or namespace is reserved!
LOG [SendEventValidation]: isKeyNameAllowed(): Filtering key severityNumber as this field or namespace is reserved!
LOG [SendEventValidation]: isKeyNameAllowed(): Filtering key severityText as this field or namespace is reserved!
LOG [SendEventValidation]: isKeyNameAllowed(): Filtering key nothingToSeeTestField as this field or namespace is reserved!
LOG [EventPipeline]: insertEvent({“dt.support.api.has_dropped_custom_properties”:true,“start_time”:1759144670436,“duration”:0})
LOG [EventPipeline]: forwardEvent({“dt.support.api.has_dropped_custom_properties”:true,“start_time”:1759144670436,“duration”:0,“dt.rum.event.source.type”:“react_native”,“react_native.bundle.name”:“simca”,“react_native.bundle.version”:“2.0.6”})
This happens on both Android and iOS.
So my question is: where can I find the event, if it is being sent at all? Is it even possible to send an event this way, or does it always need to be linked to a UserAction? Or is there a better way to capture the user behaivor for visting the screens.