Skip to content

Fix TypeError: unhashable type when stripping off tags exceeding max - #366

Open
rickatnight11 wants to merge 1 commit into
OpenTSDB:masterfrom
rickatnight11:fix/exceeding-max-tags
Open

Fix TypeError: unhashable type when stripping off tags exceeding max#366
rickatnight11 wants to merge 1 commit into
OpenTSDB:masterfrom
rickatnight11:fix/exceeding-max-tags

Conversation

@rickatnight11

Copy link
Copy Markdown

Before:

2017-04-15 19:32:17,916 tcollector[13905] ERROR: Uncaught exception in SenderThread, going to exit
Traceback (most recent call last):
  File "/usr/local/tcollector/tcollector.py", line 522, in run
    self.send_data()
  File "/usr/local/tcollector/tcollector.py", line 691, in send_data
    return self.send_data_via_http()
  File "/usr/local/tcollector/tcollector.py", line 763, in send_data_via_http
    subset_metric_keys = frozenset(metric_tags[:len(metric_tags[:self.maxtags-len(metric_entry["tags"])])])
TypeError: unhashable type
2017-04-15 19:32:17,917 tcollector[13905] INFO: shutting down children

After:

2017-04-15 19:54:08,818 tcollector[12387] ERROR: Exceeding maximum permitted metric tags - removing set(['service']) for metric proc.net.tcp
2017-04-15 19:54:08,818 tcollector[12387] ERROR: Exceeding maximum permitted metric tags - removing set(['service']) for metric proc.net.tcp
2017-04-15 19:54:08,819 tcollector[12387] ERROR: Exceeding maximum permitted metric tags - removing set(['service']) for metric proc.net.tcp
2017-04-15 19:54:08,819 tcollector[12387] INFO: Selected connection: <omitted>:4343

@vasiliyk

vasiliyk commented May 3, 2024

Copy link
Copy Markdown
Member

Rick, thank you for contributing!
Could I ask you to resubmit PR against updated tcollector?

@vasiliyk vasiliyk self-assigned this May 3, 2024
@vasiliyk vasiliyk added the bug label May 3, 2024
@rickatnight11

Copy link
Copy Markdown
Author

Sadly I haven't used tcollector in over 5y, so I'm not the best judge of how to implement this with the latest code (or if it's even still an issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants