hey everyone! I’m working on creating a webhook so...
# support
m
hey everyone! I’m working on creating a webhook source and have confirmed the connection is working as test message are being received in Rudderstack. However, the actual data is failing (test message are just test and not the same schema & format) and getting this response:
Copy code
INFO [2022-11-17 16:32:29.104] Thread-7478038 i.s.w.w.p.ImpressionsWebhookProcessor - Could not post impressions to url=###, orgId=###, integrationId=###, responseStatus=400, responseMessage=Bad Request
The data is being sent as a gzipped json, does Rudderstack support data in this format for webhook sources? If so, anybody have thoughts on what is causing the errors?
p
Hi @millions-tent-65869, can you clarify at what point you are seeing events fail? (A screenshot would be helpful here)
m
hi @plain-parrot-49913! I don’t have a screenshot. We’re using a webhook to pull impressions from split.io and the above error message is what is being returned in split when it tries to send the payload to Rudderstack. As mentioned the test messages are flowing fine showing that the connect is valid, but appears Rudderstack endpoint isn’t accepting the actual impression payload.
hey @plain-parrot-49913! did you get an opportunity to look into this by chance?
p
Hi @millions-tent-65869, when you say they are working in test messages do you mean you can see events in the Live Events viewer?
cc @narrow-rain-89253 any idea if gzipped json isn't supported in webhooks?
n
@millions-tent-65869 Do you also have the body for the 400 response returned by RudderStack ? Trying to check what exact error it encountered
m
correct! I can see the test message in live events
and the 400 error I have is what I posted above
Copy code
INFO [2022-11-17 16:32:29.104] Thread-7478038 i.s.w.w.p.ImpressionsWebhookProcessor - Could not post impressions to url=###, orgId=###, integrationId=###, responseStatus=400, responseMessage=Bad Request
I ### out a few items for privacy
n
Can you share a sample payload that is sent to RudderStack by split.io
m
here’s the schema of the payload, I unfortunately don’t have actual payloads to share as an example
Copy code
[
  {
    "key": "string", // key evaluated
    "split": "string", // split name
    "environmentId": "string", // environment id where we are evaluating the split
    "environmentName": "string", // environment name
    "treatment": "string", // treatment we gave to this key
    "time": "long", // timestamp when the SDK made the evaluation
    "bucketingKey": "string", // key used for hashing and to determine a bucket
    "label": "string", // the rule that was applied to return a treatment
    "machineName": "string", // the hostname of the SDK host (if available)
    "machineIp": "string", // the IP of the SDK host (if available)
    "splitVersionNumber": "long", // equivalent to the generation time
    "sdk": "string", // the SDK language that evaluated the split
    "sdkVersion": "string", // the SDK version that evaluated the split
    "properties": "string" // reserved for future use
  },
  // ... a list of objects with the same type
]
hi @narrow-rain-89253! Hope you are doing well!! wanted to follow up on this and see if you all have had a chance to look into it
n
Hi. Sorry for the late reply. I tried testing it out myself with above payload to a webhook source and I am unable to reproduce any errors. Only reason I can think of is the actual payload cannot be grokked by RudderStack to be a valid JSON
Can you share the sourceId so that I can poke around to see if I can find something on this
m
hi @narrow-rain-89253 the sourceid is
25cdCoRHDeUafiZnEy5hA1wrkOI
n
Sorry, could not find anything on this. Hard to debug this since RudderStack does not log rejected events. We might need to look at the actual payload sent by split to root cause this
m
@narrow-rain-89253 Here’s an example payload I was able to get
Copy code
[{"key":"agus","split":"sample_split","environmentId":"746d31d0-d5cc-11eb-91a3-02bb14121e31","environmentName":"Prod-testing","treatment":"off_b","time":1669910531819,"label":"default rule","splitVersionNumber":1669854312537,"sdk":"javascript","sdkVersion":"10.22.1"},{"key":"agus","split":"UI_show_promotions","environmentId":"746d31d0-d5cc-11eb-91a3-02bb14121e31","environmentName":"Prod-testing","treatment":"off","time":1669910531819,"label":"default rule","splitVersionNumber":1663342778797,"sdk":"javascript","sdkVersion":"10.22.1"}]
one thing to note is each HTTP POST will be gzipped
n
Ah, got it. I missed this detail. We do not support gzipped request payloads. But this has been implemented and merged and going in next release (1-2 weeks).
Sorry for all the to and fro
m
ah awesome!
based on that payload, do you believe it’ll work as expected once that feature is released?
n
yes, it would.
m
perfect, thanks for your help on this!!