architecture-beta
group clientCluster(cloud)[Client Cluster]
service clientTemporal(server)[Temporal OSS frontend] in clientCluster
service clientS2S(server)[S2S Proxy] in clientCluster
service clientPort(internet)[Client multiplexed port] in clientCluster
group temporalCloud(cloud)[Temporal Cloud]
service serviceTemporal(server)[Temporal Cloud frontend] in temporalCloud
service serviceS2S(server)[S2S Proxy] in temporalCloud
service servicePort(internet)[Temporal Cloud migration port] in temporalCloud
%% Client connections
clientTemporal:T <--> B:clientS2S
clientS2S:R <--> L:clientPort
%% Temporal Cloud connections
serviceTemporal:T <--> B:serviceS2S
serviceS2S:L <--> R:servicePort
%% Client<->Cloud connections
servicePort:L <--> R:clientPort
What is the S2S-Proxy?
What is Prometheus and how does it work?
grpc_server_handled_totalfor each of multiple sources, for example by method.Why raw Prometheus over Tally/OpenTelemetry?
Prometheus setup in s2s-proxy
initfunction at the bottom which registers all the counters to the default. Counters really are just atomic values, and the registry is where the logic required to scan them is located.Way down at the bottom, we get to see our metric:
Add metrics everywhere!
Appendix: Why use metrics to solve problems?
log.Infoin your code. Name the counter after what that log is describing, and set the metric labels to the parameters you would have passed to your log. This does the same thing as a log-scanning tool like AWS Cloudwatch or Xray, but in a fraction of the cost and time.Appendix: Writing great dashboards
https://link.excalidraw.com/readonly/7FnmAzvf6JxlGSsshExI
{cluster="xyz", container="abc", grpc_code=...}runtime/metricspackage. For Java, it’s JMX. )