-
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
Changes from all commits
2e73608
30a61ad
4597795
abce48d
d2f34ee
ff390ff
42cc3f5
25e1978
b1fedf9
06e63ee
bac0b2f
aabe9a8
341112a
1d87471
f858b34
7148c78
7784a8d
7a86512
db89208
4cd4aed
255136d
e685282
8d8f54b
e823655
c2f26d0
fde3ea7
2803188
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,5 @@ | |
# Fossa | ||
.fossa.yml | ||
|
||
# direnv | ||
.envrc | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ const ( | |
// The hostName syntax is defined in | ||
// https://github.com/grpc/grpc/blob/master/doc/naming.md. | ||
// e.g. to use dns resolver, a "dns:///" prefix should be applied to the target. | ||
func Dial(hostName string, tlsConfig *tls.Config, logger log.Logger) (*grpc.ClientConn, error) { | ||
func Dial(hostName string, tlsConfig *tls.Config, logger log.Logger, interceptors ...grpc.UnaryClientInterceptor) (*grpc.ClientConn, error) { | ||
// Default to insecure | ||
grpcSecureOpt := grpc.WithInsecure() | ||
if tlsConfig != nil { | ||
|
@@ -83,9 +83,12 @@ func Dial(hostName string, tlsConfig *tls.Config, logger log.Logger) (*grpc.Clie | |
grpcSecureOpt, | ||
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxInternodeRecvPayloadSize)), | ||
grpc.WithChainUnaryInterceptor( | ||
versionHeadersInterceptor, | ||
metrics.NewClientMetricsTrailerPropagatorInterceptor(logger), | ||
errorInterceptor, | ||
append( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the order important here? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
interceptors, | ||
versionHeadersInterceptor, | ||
metrics.NewClientMetricsTrailerPropagatorInterceptor(logger), | ||
errorInterceptor, | ||
)..., | ||
), | ||
grpc.WithDefaultServiceConfig(DefaultServiceConfig), | ||
grpc.WithDisableServiceConfig(), | ||
|
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