Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rickatnight11
Copy link

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
Copy link
Member

vasiliyk commented May 3, 2024

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
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