-
Notifications
You must be signed in to change notification settings - Fork 874
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
Per-service fx-ified OTEL tracing #2896
Conversation
versionHeadersInterceptor, | ||
metrics.NewClientMetricsTrailerPropagatorInterceptor(logger), | ||
errorInterceptor, | ||
append( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the order important here?
If so we should probably leave a comment as such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's sort of a bigger problem in that we have some interceptors that are hard-coded to exist and another set that comes from runtime parameters so if there was some sort of important ordering dependency then it would be difficult to resolve.
That said, in this case where I happen to know that the interceptor slice contains just the trace interceptor (or is empty) then the order isn't all that imporant.
@@ -28,3 +28,5 @@ | |||
# Fossa | |||
.fossa.yml | |||
|
|||
# direnv | |||
.envrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just fyi, my strategy is to put an .envrc
in the directory above this repo, so I can share it with the other temporal repos too
Removes the serviceName parameter from the ServiceTrackingModule function (now just a var) as that piece of data can be read from the DI container as a dependency. Also inits the OTEL error logger to delegate to the server's Zap logger.
Host and process attributes can be auto-detected.
Do this so that we can make the ClientConn dialing lazy (i.e. occurs at when Start() is called on the exporter) because (a) that's preferrable anyway and (b) easier to unit test when construction and execution phases are separate.
Made valueOrDefault more general and renamed to coalesce
Avoid possible confusion with temporal sdk
Avoids potential naming confusion with Temporal SDK related packages.
What changed?
Configures OTEL tracing from configuration YAML and injects into the main 4 services (frontend, history, matching, worker)
Why?
Providing TracerProvider/Tracer instances to key types allows us to create and export spans, thereby improving runtime observability.
How did you test it?
Existing and new unit tests. If the fx changes are broken then the server will refuse to come up.
Also manual testing with a local otelcol
Potential risks
Low risk - If you don't have an
otel
stanza in your config yaml to set up some exporters file then nothing is going to run.Is hotfix candidate?
No