Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override ExportClientResponse SendExportRequest(byte[] buffer, int conten
status = new Status(StatusCode.Internal, "Failed to deserialize response message.");
}

OpenTelemetryProtocolExporterEventSource.Log.ResponseDeserializationFailed(this.Endpoint.ToString());
OpenTelemetryProtocolExporterEventSource.Log.ResponseDeserializationFailed(this.Endpoint);

return new ExportClientGrpcResponse(
success: false,
Expand All @@ -88,7 +88,7 @@ public override ExportClientResponse SendExportRequest(byte[] buffer, int conten

if (status.StatusCode == StatusCode.OK)
{
OpenTelemetryProtocolExporterEventSource.Log.ExportSuccess(this.Endpoint.ToString(), "Export completed successfully.");
OpenTelemetryProtocolExporterEventSource.Log.ExportSuccess(this.Endpoint, "Export completed successfully.");
return SuccessExportResponse;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public override ExportClientResponse SendExportRequest(byte[] buffer, int conten
return new ExportClientHttpResponse(success: false, deadlineUtc: deadlineUtc, response: httpResponse, ex);
}

OpenTelemetryProtocolExporterEventSource.Log.ExportSuccess(this.Endpoint, "Export completed successfully.");
return SuccessExportResponse;
}
catch (HttpRequestException ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@ public void ExportFailure(Uri endpoint, string message, Status status)
}
}

[NonEvent]
public void ExportSuccess(Uri endpoint, string message)
{
if (Log.IsEnabled(EventLevel.Informational, EventKeywords.All))
{
this.ExportSuccess(endpoint.ToString(), message);
}
}

[NonEvent]
public void ResponseDeserializationFailed(Uri endpoint)
{
if (Log.IsEnabled(EventLevel.Error, EventKeywords.All))
{
this.ResponseDeserializationFailed(endpoint.ToString());
}
}

[Event(2, Message = "Exporter failed send data to collector to {0} endpoint. Data will not be sent. Exception: {1}", Level = EventLevel.Error)]
public void FailedToReachCollector(string rawCollectorUri, string ex)
{
Expand Down
Loading