Skip to content

Add note that messageId is limited to 100 chars #6893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/_includes/content/spec-field-message-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<td markdown="span">`messageId`</td>
<td markdown="span">*implicit*</td>
<td markdown="span">String</td>
<td markdown="span">Automatically collected by Segment, a unique identifier for each message that lets you find an individual message across the API.</td>
<td markdown="span">Automatically collected by Segment, a unique identifier for each message that lets you find an individual message across the API. This field is limited to 100 characters.</td>
</tr>
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Common reasons events are not accepted by Segment include:
- **Payload is too large:** The HTTP API can handle API requests that are 32KB or smaller. The batch API endpoint accepts a maximum of 500KB per request, with a limit of 32KB per event in the batch. If these limits are exceeded, Segment returns a 400 Bad Request error.
- **Identifier is not present**: The HTTP API requires that each payload has a userId and/or anonymousId.
- **Track event is missing name**: All Track events sent to Segment must have an `event` field.
- **Deduplication**: Segment deduplicates events using the `messageId` field, which is automatically added to all payloads coming into Segment. If you're setting up the HTTP API yourself, ensure all events have unique messageId values.
- **Deduplication**: Segment deduplicates events using the `messageId` field, which is automatically added to all payloads coming into Segment. If you're setting up the HTTP API yourself, ensure all events have unique messageId values with fewer than 100 characters.
- **Invalid JSON**: If you send an event with invalid JSON, Segment returns a 400 Bad Request error.

Segment welcomes feedback on API responses and error messages. [Reach out to support](https://segment.com/help/contact/){:target="_blank"} with any requests or suggestions you may have.
Expand Down
2 changes: 1 addition & 1 deletion src/guides/duplicate-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Segment has a special deduplication service that sits behind the `api.segment.co
Segment deduplicates on the event's `messageId`, _not_ on the contents of the event payload. Segment doesn't have a built-in way to deduplicate data for events that don't generate `messageId`s. The message de-duplication is not scoped to a specific source or a workspace, and applies to all events being received by Segment.

> info ""
> Keep in mind that Segment's libraries all generate `messageId`s for each event payload, with the exception of the Segment HTTP API, which assigns each event a unique `messageId` when the message is ingested. You can override these default generated IDs and manually assign a `messageId` if necessary.
> Keep in mind that Segment's libraries all generate `messageId`s for each event payload, with the exception of the Segment HTTP API, which assigns each event a unique `messageId` when the message is ingested. You can override these default generated IDs and manually assign a `messageId` if necessary. The `messageId` field is limited to 100 characters.

## Warehouse deduplication
Duplicate events that are more than 24 hours apart from one another deduplicate in the Warehouse. Segment deduplicates messages going into a Warehouse ([including Profiles Sync data](/docs/unify/profiles-sync/)) based on the `messageId`, which is the `id` column in a Segment Warehouse.
Expand Down
Loading