Skip to content

Commit c89d441

Browse files
committed
More windows fixes
1 parent b23503f commit c89d441

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/cpp/ext/otel/otel_client_call_tracer.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ void OpenTelemetryPluginImpl::ClientCallTracer::CallAttemptTracer::RecordEnd(
276276
void OpenTelemetryPluginImpl::ClientCallTracer::CallAttemptTracer::
277277
RecordAnnotation(absl::string_view annotation) {
278278
if (span_ != nullptr) {
279-
span_->AddEvent(annotation);
279+
span_->AddEvent(AbslStringViewToNoStdStringView(annotation));
280280
}
281281
}
282282

@@ -393,8 +393,10 @@ absl::string_view OpenTelemetryPluginImpl::ClientCallTracer::MethodForStats()
393393
}
394394

395395
void OpenTelemetryPluginImpl::ClientCallTracer::RecordAnnotation(
396-
absl::string_view /*annotation*/) {
397-
// Not implemented
396+
absl::string_view annotation) {
397+
if (span_ != nullptr) {
398+
span_->AddEvent(AbslStringViewToNoStdStringView(annotation));
399+
}
398400
}
399401

400402
void OpenTelemetryPluginImpl::ClientCallTracer::RecordAnnotation(

src/cpp/ext/otel/otel_server_call_tracer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ void OpenTelemetryPluginImpl::ServerCallTracer::RecordOutgoingBytes(
240240
void OpenTelemetryPluginImpl::ServerCallTracer::RecordAnnotation(
241241
absl::string_view annotation) {
242242
if (span_ != nullptr) {
243-
span_->AddEvent(annotation);
243+
span_->AddEvent(AbslStringViewToNoStdStringView(annotation));
244244
}
245245
}
246246

0 commit comments

Comments
 (0)