Hey there! We are using RudderStack in free tier ...
# support
e
Hey there! We are using RudderStack in free tier to test if this is a tool we would like to use for our internal tracking. We have successfully integrated it in our app and are sending events. We can see events in the event flow chart, but we are not able to see events in “Live events” page. We would like to see events in live mode in order to debug them and see the payload. Is this something that is not working in free tier or what could be the issue? Thanks for your help!
m
Hey There! 👋 Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
g
It is available in free tier. Check if you are sending events to the right data plane url
e
The data plane URL is the one that is mentioned in the Setup page for the source. I’m assuming the events were received as they are displayed in the event flow chart. Is there any other way (than live mode) to inspect event payload?
q
sometimes it takes a little longer for events to be displayed in the live events tab (like 1 - 2 min). Are you seeing the issue in both source and destination live events or only in one?
e
I performed a few tests to get a better insight. I connected my Ruby source to 2 different webhook destinations which are HTTP request dumps (HTTP dump and Pipedream RequestBin). I triggered a track event using the Ruby library.
Copy code
analytics.track(
  :user_id => 'USER-1',
  :event => 'Item Sold',
  :properties => { :revenue => 9.95, :shipping => 'Free' }
)
The event is successfully dispatched.
Copy code
[rudderanalytics-ruby] Sending request for 1 items
[rudderanalytics-ruby] Response status code: 200
[rudderanalytics-ruby] Response error: OK
In Rudderstack I tried 2 different setups and I got the following results in live events mode: • Source + 1 destination (http dump) ◦ Source: 0 events Destination (http dump): 1 event with error • Source + 2 destinations (http dump, pipedream) ◦ Source: 0 events ◦ Destination 1 (http dump): 1 event with error ◦ Destination 2 (pipedream): 1 event with error I tried dispatching the track event several times and the results in live mode were inconsistent: • Source: Event was never visible. • Destinations: Event was visible sometimes, but not always. Sometimes it was only visible in 1 destination. In event ingestion/delivery view all events are logged. The error was always the same which makes me believe that it was not caused by the destination as they are 2 different services. The actual webhook destinations never recieved any hits.
Copy code
{
  "error": "Message type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message type is not present. Aborting message."
}
Below is the payload of the event
Copy code
{
  "json_size": 348,
  "max_message_count": 100,
  "messageId": "2fbb7124-eeb9-4474-b5bb-5e789df65b42",
  "messages": [
    {
      "channel": "server",
      "context": {
        "library": {
          "name": "rudderanalytics-ruby",
          "version": "2.0.1"
        }
      },
      "event": "Item Sold",
      "integrations": {
        "All": true
      },
      "messageId": "36e8379c-cfe2-49d1-9878-9ee762a9e42e",
      "properties": {
        "revenue": 9.95,
        "shipping": "Free"
      },
      "sentAt": "2023-04-14T05:46:53.178Z",
      "timestamp": "2023-04-14T05:46:53.178Z",
      "type": "track",
      "userId": "USER-1"
    }
  ],
  "originalTimestamp": "2023-04-14T05:46:55.062Z",
  "receivedAt": "2023-04-14T05:46:53.775Z",
  "request_ip": "146.212.67.110",
  "rudderId": "853ae90f-0351-424b-973e-a615e6487517",
  "sentAt": "2023-04-14T05:46:55.062Z",
  "timestamp": "2023-04-14T05:46:53.774Z"
}
q
How are you initializing the ruby sdk and how are you making the identify call? 400 suggests an issue on the client side and 0 events in source also suggests the same that the event instrumentation might have some problem
e
For simplicity and repeatability sake I just ran the following code in the console. I used the same examples as in the docs. I double checked that ENV variables return the correct credentials. We tried rudder-sdk-ruby 2.0.0 and 2.0.1
Copy code
analytics = Rudder::Analytics.new(
  write_key: ENV['WRITE_KEY'],
  data_plane_url: ENV['DATA_PLANE_URL'],
  on_error: proc { |error_code, error_body, exception, response| }
)

analytics.identify(
  :user_id => '1hKOmRA4GRlm',
  :traits => { :email => "alex@example.com", :friends => 1 },
  :context => {:ip => '10.81.20.10'}
)

analytics.track(
  :user_id => '1hKOmRA4GRlm',
  :event => 'Item Sold',
  :properties => { :revenue => 9.95, :shipping => 'Free' }
)
Here are the results from destination live view.
Copy code
{
  "json_size": 408,
  "max_message_count": 100,
  "messageId": "3a9d8b02-c84c-4bd9-b12c-fc83f121e351",
  "messages": [
    {
      "channel": "server",
      "context": {
        "ip": "10.81.20.10",
        "library": {
          "name": "rudderanalytics-ruby",
          "version": "2.0.1"
        },
        "traits": {
          "email": "alex@example.com",
          "friends": 1
        }
      },
      "integrations": {
        "All": true
      },
      "messageId": "44ea7968-9056-46ce-b6a6-59f783cac085",
      "sentAt": "2023-04-14T15:32:24.752Z",
      "timestamp": "2023-04-14T15:32:24.752Z",
      "traits": {
        "email": "alex@example.com",
        "friends": 1
      },
      "type": "identify",
      "userId": "1hKOmRA4GRlm"
    }
  ],
  "originalTimestamp": "2023-04-14T15:32:25.984Z",
  "receivedAt": "2023-04-14T15:32:25.248Z",
  "request_ip": "146.212.67.110",
  "rudderId": "853ae90f-0351-424b-973e-a615e6487517",
  "sentAt": "2023-04-14T15:32:25.984Z",
  "timestamp": "2023-04-14T15:32:25.247Z"
}
{
  "json_size": 354,
  "max_message_count": 100,
  "messageId": "a6a4e3f2-bb59-4bb2-b890-c56b616d0a7d",
  "messages": [
    {
      "channel": "server",
      "context": {
        "library": {
          "name": "rudderanalytics-ruby",
          "version": "2.0.1"
        }
      },
      "event": "Item Sold",
      "integrations": {
        "All": true
      },
      "messageId": "37d81b79-6b0a-4f44-a6b5-7ffee89f5334",
      "properties": {
        "revenue": 9.95,
        "shipping": "Free"
      },
      "sentAt": "2023-04-14T15:32:34.948Z",
      "timestamp": "2023-04-14T15:32:34.948Z",
      "type": "track",
      "userId": "1hKOmRA4GRlm"
    }
  ],
  "originalTimestamp": "2023-04-14T15:32:36.118Z",
  "receivedAt": "2023-04-14T15:32:35.325Z",
  "request_ip": "146.212.67.110",
  "rudderId": "853ae90f-0351-424b-973e-a615e6487517",
  "sentAt": "2023-04-14T15:32:36.118Z",
  "timestamp": "2023-04-14T15:32:35.324Z"
}
{
  "json_size": 354,
  "max_message_count": 100,
  "messageId": "a6a4e3f2-bb59-4bb2-b890-c56b616d0a7d",
  "messages": [
    {
      "channel": "server",
      "context": {
        "library": {
          "name": "rudderanalytics-ruby",
          "version": "2.0.1"
        }
      },
      "event": "Item Sold",
      "integrations": {
        "All": true
      },
      "messageId": "37d81b79-6b0a-4f44-a6b5-7ffee89f5334",
      "properties": {
        "revenue": 9.95,
        "shipping": "Free"
      },
      "sentAt": "2023-04-14T15:32:34.948Z",
      "timestamp": "2023-04-14T15:32:34.948Z",
      "type": "track",
      "userId": "1hKOmRA4GRlm"
    }
  ],
  "originalTimestamp": "2023-04-14T15:32:36.118Z",
  "receivedAt": "2023-04-14T15:32:35.325Z",
  "request_ip": "146.212.67.110",
  "rudderId": "853ae90f-0351-424b-973e-a615e6487517",
  "sentAt": "2023-04-14T15:32:36.118Z",
  "timestamp": "2023-04-14T15:32:35.324Z"
}
{
  "json_size": 354,
  "max_message_count": 100,
  "messageId": "a6a4e3f2-bb59-4bb2-b890-c56b616d0a7d",
  "messages": [
    {
      "channel": "server",
      "context": {
        "library": {
          "name": "rudderanalytics-ruby",
          "version": "2.0.1"
        }
      },
      "event": "Item Sold",
      "integrations": {
        "All": true
      },
      "messageId": "37d81b79-6b0a-4f44-a6b5-7ffee89f5334",
      "properties": {
        "revenue": 9.95,
        "shipping": "Free"
      },
      "sentAt": "2023-04-14T15:32:34.948Z",
      "timestamp": "2023-04-14T15:32:34.948Z",
      "type": "track",
      "userId": "1hKOmRA4GRlm"
    }
  ],
  "originalTimestamp": "2023-04-14T15:32:36.118Z",
  "receivedAt": "2023-04-14T15:32:35.325Z",
  "request_ip": "146.212.67.110",
  "rudderId": "853ae90f-0351-424b-973e-a615e6487517",
  "sentAt": "2023-04-14T15:32:36.118Z",
  "timestamp": "2023-04-14T15:32:35.324Z"
}
Is it possible to schedule a call for next week with someone from Rudderstack to guide me through?
Turns out gzipping requests is turned on by default which causes errors when processing the events. I have turned it off and it now works. Why is this turned on by default if it does not work in RudderStack Cloud?
q
Gzip requires rudder-server v1.4 or higher. Otherwise, your events might fail.
Can you check your rudder-server version? https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-ruby-sdk/#gzipping-requests
e
We are using Rudderstack Cloud, therefore we assumed the latest stable version is used. How can we check this in the dashboard?
q
@echoing-rain-18959 There is a new version released on a similar issue. Can you try V2.0.2 of ruby SDK Here is the fix https://github.com/rudderlabs/rudder-sdk-ruby/releases/tag/v2.0.2
🙌 1
e
Tested and works! Thanks 🙂