Skip to content

Conversation

@LikeTheSalad
Copy link
Contributor

These changes are meant as a temporary workaround for this issue.

We need to decide whether we are going to add support for extended attributes in disk buffering while they are incubating. However, in the meantime these changes will prevent the issue mentioned above where logs are completely broken due to the cast issue.

@LikeTheSalad LikeTheSalad marked this pull request as ready for review May 28, 2025 15:08
@LikeTheSalad LikeTheSalad requested a review from a team May 28, 2025 15:08
@github-actions github-actions bot requested a review from zeitlinger May 28, 2025 15:08
import io.opentelemetry.sdk.resources.Resource;
import javax.annotation.Nullable;

@SuppressWarnings({"deprecation", "SuppressWarningsWithoutExplanation"})
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of SuppressWarningsWithoutExplanation we usually add the explanation. If possible move the deprecation closer to where the deprecated method is used.
Looking at the sdk code there are 2 implementations for these classes. The extended one when the incubator is available and the non-extended one that is used otherwise. Did you consider using the same pattern?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of SuppressWarningsWithoutExplanation we usually add the explanation. If possible move the deprecation closer to where the deprecated method is used.

Got it. I've just updated it.

Looking at the sdk code there are 2 implementations for these classes. The extended one when the incubator is available and the non-extended one that is used otherwise. Did you consider using the same pattern?

I think that's the approach we should take when/if we add early support for extended attributes in this module. I'm not sure for how long this feature is meant to stay in an incubating state, which is something I wanted to check in the issue thread but so far I haven't gotten feedback on that, so that if it's not too long, maybe we won't need to create 2 impls if we can just wait for the stable interface to get extended. For now, my goal with these changes is to at least keep the "old/stable impl" working in the meantime, since all logs are broken atm.

Copy link
Contributor

@laurit laurit left a comment

Choose a reason for hiding this comment

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

I think it is fine for a temporary workaround.

@trask trask added this pull request to the merge queue Jun 4, 2025
Merged via the queue into open-telemetry:main with commit 5581d56 Jun 4, 2025
19 checks passed
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.

4 participants