Skip to content

Conversation

@liustve
Copy link
Contributor

@liustve liustve commented Feb 24, 2025

Description of changes:
Modified the toString method for the SigV4 exporter to say OtlpAwsSpanExporter instead of OtlpHttpSpanExporter.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@liustve liustve requested a review from a team as a code owner February 24, 2025 20:13
@Override
public String toString() {
return this.parentExporter.toString();
return this.parentExporter.toString().replace("OtlpHttpSpanExporter", "OtlpAwsSpanExporter");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not return a constant value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to keep the same toString message as this class:

https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/otlp/all/src/main/java/io/opentelemetry/exporter/otlp/http/trace/OtlpHttpSpanExporter.java

But override the class name to make it more clear for log messages.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just copy the code to here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toString copied in new PR:

#1046

@liustve liustve closed this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants