Skip to content

Add metrics for translations#139

Merged
pglass merged 9 commits intomainfrom
pglass/translation-metrics
Aug 20, 2025
Merged

Add metrics for translations#139
pglass merged 9 commits intomainfrom
pglass/translation-metrics

Conversation

@pglass
Copy link
Contributor

@pglass pglass commented Aug 20, 2025

What was changed

  • Add translation success metric: temporal_s2s_proxy_translation_success{kind="", message_type=""}
  • Add translation error metric: temporal_s2s_proxy_translation_error{kind="", message_type=""}

Labels:

  • kind: The kind of translation. One of namespace, search-attribute, or utf8repair (or possibly others added in the future)
  • message_type: The message type

Examples

utf8repair on one proxy

# HELP temporal_s2s_proxy_translation_success Count of message translations
# TYPE temporal_s2s_proxy_translation_success counter
temporal_s2s_proxy_translation_success{kind="utf8repair",message="*adminservice.StreamWorkflowReplicationMessagesResponse"} 160

namespace and utf8repair on another proxy

# HELP temporal_s2s_proxy_translation_success Count of message translations
# TYPE temporal_s2s_proxy_translation_success counter
temporal_s2s_proxy_translation_success{kind="namespace",message="GetNamespaceReplicationMessagesResponse"} 2
temporal_s2s_proxy_translation_success{kind="utf8repair",message="historyblob"} 18

Why?

Checklist

  1. Closes

  2. How was this tested:

Local manual test.

  1. Any docs updates needed?

@pglass pglass requested a review from a team as a code owner August 20, 2025 01:53
@pglass pglass requested a review from temporal-nick August 20, 2025 01:53
MuxErrors = DefaultCounterVec("mux_errors", "Number of errors observed from mux", muxManagerLabels...)
MuxConnectionEstablish = DefaultCounterVec("mux_connection_establish", "Number of times mux has established", muxManagerLabels...)

translationLabels = []string{"kind", "message"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about message_type or msg_type instead of just "message"? I was briefly worried this was going to be like 100+ chars long

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to message_type

Base automatically changed from pglass/utf8codec to main August 20, 2025 22:26
@pglass pglass merged commit 5e3a5fc into main Aug 20, 2025
6 checks passed
@pglass pglass deleted the pglass/translation-metrics branch August 20, 2025 22:42
hai719 pushed a commit to hai719/s2s-proxy that referenced this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants