Repository navigation
Stop Slack payloads from spreading into span attributes - #597
Merged
Merged
Conversation
o11y flattens maps into one attribute per key. Slack API responses, interaction payloads and request params were set whole, so every new response shape, action or param name became new columns in the pears Honeycomb dataset, which sits at its 10,000-column limit. The Slack handle form params are keyed by pear name, so they also leaked per-pear keys like the ones removed in #563. - Add Pears.O11y helpers that record a fixed set of scalar fields: set_slack_response (ok, error, channel_id, ts), set_slack_interaction (type, callback_id, user_id, team_id, action_ids) and set_param_keys (sorted param names as one string) - Use them in Pears.Slack, Pears.SlackClient and the Slack controllers - Drop :params from the save_slack_names / save_slack_handles span includes and :result from the send_message includes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marcdel
marked this pull request as ready for review
November 20, 2026 19:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: Slack API responses, interaction payloads and request params went onto spans as whole maps. o11y flattens maps into one attribute per key, so each new response shape, Slack action or param name added columns to the pears Honeycomb dataset. The Slack handle form params are keyed by pear name, so they also created per-pear keys like the ones #563 removed. The dataset is at its 10,000-column limit.
After: these spans carry a fixed set of scalar fields, so Slack traffic stops adding columns.
response.*:ok,error,channel_id,tspayload.*:type,callback_id,user_id,team_id,action_ids(comma-joined)param_keys: the sorted param names as one string, for the error paths in the Slack controllersparam_countonslack.save_slack_names; the pear-keyedparamsno longer goes on that span or onslack_live.save_slack_handlesHow: new helpers in
Pears.O11ybuild a small map of known fields and set it with a prefix.Pears.Slack,Pears.SlackClientand the two Slack controllers call them in place ofset_attribute(:response | :payload | :params, map). Thesend_messagespans no longer include:result. New tests intest/pears/o11y_test.exscheck the exact attribute keys. I could not run the suite locally, so CI is the first run.This stops new columns only. The existing stale columns still count toward the limit until they are deleted (for example with Honeycomb's column cleanup script in
last_written_beforemode).Generated by Claude Code