Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[component] Move internal/sharedcomponent to component/sharedcomponent #9321

Closed
wants to merge 1 commit into from

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Jan 20, 2024

Description:
Move internal/sharedcomponent to component/sharedcomponent.

Link to tracking Issue:
Fixes #4266

@atoulme atoulme requested review from a team and mx-psi January 20, 2024 06:22
@atoulme atoulme force-pushed the move_sharedcomponent branch from 6a795ba to 6d69f67 Compare January 20, 2024 06:23
Copy link

codecov bot commented Jan 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.41%. Comparing base (72f6ce1) to head (6d69f67).
Report is 156 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9321      +/-   ##
==========================================
+ Coverage   90.34%   90.41%   +0.06%     
==========================================
  Files         340      340              
  Lines       17989    17989              
==========================================
+ Hits        16253    16265      +12     
+ Misses       1412     1401      -11     
+ Partials      324      323       -1     

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

@mx-psi mx-psi requested a review from bogdandrutu January 22, 2024 10:07
Copy link
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 start looking into the items listed before making this public.

@@ -4,7 +4,7 @@
// Package sharedcomponent exposes functionality for components
// to register against a shared key, such as a configuration object, in order to be reused across signal types.
// This is particularly useful when the component relies on a shared resource such as os.File or http.Server.
package sharedcomponent // import "go.opentelemetry.io/collector/internal/sharedcomponent"
package sharedcomponent // import "go.opentelemetry.io/collector/component/sharedcomponent"
Copy link
Member

Choose a reason for hiding this comment

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

As mentioned in my previous comment, I am not sure this is right now:

  1. The fact that we need to pass TelemetrySettings feels a hack and I want to better look into why we need that. I do understand some use-case but maybe we have a different "SharedTelemetrySettings" for that. Also not sure why start/stop calls the TelemetrySettings that way vs we return the right status all the time for multiple calls.
  2. Right now we stop first time, which may not be ideal. Ideally we should call start first time and stop last time, but this is not possible for grpc servers. But for other "shared" components that probably should be the case and an external mechanism block receiving/emitting data to match the Receiver/Processor behaviors.

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 can file issues for both items.

I'm not clear on 1, but I'll give it my best try.

I assumed for 2. we abandoned because that wasn't easily possible, but we can look again with your suggestion.

Copy link
Contributor Author

@atoulme atoulme Feb 8, 2024

Choose a reason for hiding this comment

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

I have opened #9527 to try and tackle 1. Thank you for your comment, took me a bit but I think this change is in line with it. Let' s see how it does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding 2. maybe we can have the sharedcomponents.Map take a configuration to shut down components early or late, so folks can opt in.

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

Just a sanity check: why do we need this for 1.0? Can't we postpone it?

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Feb 27, 2024
@atoulme
Copy link
Contributor Author

atoulme commented Mar 4, 2024

Closing - I think we can release 1.0 without this package.

@atoulme atoulme closed this Mar 4, 2024
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.

Make SharedComponents public
3 participants