Skip to content

[exporterhelper] Deprecate RequestSizer#13804

Closed
mx-psi wants to merge 3 commits into
open-telemetry:mainfrom
mx-psi:mx-psi/requests-remove-methods
Closed

[exporterhelper] Deprecate RequestSizer#13804
mx-psi wants to merge 3 commits into
open-telemetry:mainfrom
mx-psi:mx-psi/requests-remove-methods

Conversation

@mx-psi
Copy link
Copy Markdown
Member

@mx-psi mx-psi commented Sep 9, 2025

Description

Deprecates an unused type. As can be seen in https://github.com/search?q=%2FRequestSizer%5Cb%2F+-is%3Afork+language%3AGo+NOT+repo%3Arpradeepkumar7%2Ffirst-opentelemetry-exporter&type=code&l=Go it is not used anywhere, inside or outside of this repository

Link to tracking issue

Updates #11143

@mx-psi mx-psi force-pushed the mx-psi/requests-remove-methods branch from ee0efbf to 2b0646b Compare September 9, 2025 16:00
@mx-psi mx-psi marked this pull request as ready for review September 9, 2025 16:00
@mx-psi mx-psi requested review from a team, bogdandrutu and dmitryax as code owners September 9, 2025 16:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.44%. Comparing base (66f2c45) to head (4170014).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13804      +/-   ##
==========================================
+ Coverage   91.43%   91.44%   +0.01%     
==========================================
  Files         640      640              
  Lines       42665    42665              
==========================================
+ Hits        39009    39017       +8     
+ Misses       2836     2830       -6     
+ Partials      820      818       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

Please don't do this since they are planned to be used.

The whole idea is to allow other exporters to have different implementations of the Request object, and things like The RequestErroHandler type is used to communicate between the export function and the retry mechanism in case partial retries are needed.

I am OK if we want to drop the whole idea of supporting custom implementation for the Request then a larger cleanup is needed, otherwise we should let these helpers public so custom implementation can use.

@mx-psi
Copy link
Copy Markdown
Member Author

mx-psi commented Sep 10, 2025

@bogdandrutu I am going to do a bigger refactor and e.g. move the New*Request methods to xexporterhelper. However, I wanted to deal with these two independently because:

  1. RequestSizer is not used at all, neither within opentelemetry-collector or outside of it https://github.com/search?q=org%3Aopen-telemetry+%2FRequestSizer%5Cb%2F&type=code
  2. RequestErroHandler is used only internally and it's functionality seems independent from the rest of the code.

I can just move RequestErrorHandler to xexporterhelper, but I do think we can just remove RequestSizer, it is not used at all.

@mx-psi mx-psi changed the title [exporterhelper] Deprecate RequestErrorHandler and RequestSizer [exporterhelper] Deprecate RequestSizer Sep 10, 2025
@mx-psi
Copy link
Copy Markdown
Member Author

mx-psi commented Sep 10, 2025

I changed it so that we only remove RequestSizer which is completely unused.

@mx-psi mx-psi requested a review from bogdandrutu September 10, 2025 11:43
@mx-psi
Copy link
Copy Markdown
Member Author

mx-psi commented Sep 10, 2025

#13821 moves all Experimental symbols to xexporterhelper.

@bogdandrutu
Copy link
Copy Markdown
Member

I changed it so that we only remove RequestSizer which is completely unused.

In QueueBatchSettings you can see there are some arguments like ItemsSizer which I think is the RequestSizer type

@mx-psi
Copy link
Copy Markdown
Member Author

mx-psi commented Sep 11, 2025

Okay, I see. I did not realize we were using type aliases in that way.

I will then suggest we move this to xexporterhelper. Let's continue the discussion over at #13821

@mx-psi mx-psi closed this Sep 11, 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.

3 participants