|
|
|
@ -284,10 +284,24 @@ void OpenCensusCallTracer::OpenCensusCallAttemptTracer::RecordEnd( |
|
|
|
|
|
|
|
|
|
void OpenCensusCallTracer::OpenCensusCallAttemptTracer::RecordAnnotation( |
|
|
|
|
absl::string_view annotation) { |
|
|
|
|
// If tracing is disabled, the following will be a no-op.
|
|
|
|
|
if (!context_.Span().IsRecording()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
context_.AddSpanAnnotation(annotation, {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OpenCensusCallTracer::OpenCensusCallAttemptTracer::RecordAnnotation( |
|
|
|
|
const Annotation& annotation) { |
|
|
|
|
if (!context_.Span().IsRecording()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
switch (annotation.type()) { |
|
|
|
|
default: |
|
|
|
|
context_.AddSpanAnnotation(annotation.ToString(), {}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// OpenCensusCallTracer
|
|
|
|
|
//
|
|
|
|
@ -355,10 +369,23 @@ OpenCensusCallTracer::StartNewAttempt(bool is_transparent_retry) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OpenCensusCallTracer::RecordAnnotation(absl::string_view annotation) { |
|
|
|
|
// If tracing is disabled, the following will be a no-op.
|
|
|
|
|
if (!context_.Span().IsRecording()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
context_.AddSpanAnnotation(annotation, {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OpenCensusCallTracer::RecordAnnotation(const Annotation& annotation) { |
|
|
|
|
if (!context_.Span().IsRecording()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
switch (annotation.type()) { |
|
|
|
|
default: |
|
|
|
|
context_.AddSpanAnnotation(annotation.ToString(), {}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OpenCensusCallTracer::RecordApiLatency(absl::Duration api_latency, |
|
|
|
|
absl::StatusCode status_code) { |
|
|
|
|
if (OpenCensusStatsEnabled()) { |
|
|
|
|