telemetry(observations): fix the details flag check (#3960)
* telemetry(observations): fix the details flag check * telemetry(observations): fix the test names
This commit is contained in:
1 parent
b000aa3068
commit
4dce290aeb
6 files changed
+20
-8
No files matched your search
@@ -110,7 +110,8 @@ func WriteObservation(ctx context.Context, caller Op, opt ...Option) error {
|
||||
"%w", op, ErrInvalidParameter)
|
||||
}
|
||||
// For the case that the telemetry is not enabled, and we have events coming from interceptors.
|
||||
if !eventer.conf.TelemetryEnabled && (opts.withRequest != nil || opts.withResponse != nil) {
|
||||
// or the case that incoming call only has withDetails without enabling telemetry.
|
||||
if !eventer.conf.TelemetryEnabled && (opts.withRequest != nil || opts.withResponse != nil || opts.withDetails != nil) {
|
||||
return nil
|
||||
}
|
||||
// If telemetry is enabled, we add it to the options.
|
||||
|
||||
Reference in new issue
Block a user