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

Refactored Jaeger exporter to move connection into start for upcoming Auth changes. #3299

Merged
merged 4 commits into from
May 26, 2021
Merged

Conversation

pavankrish123
Copy link
Contributor

Description:
Updated JaegerExporter for upcoming client auth extension changes

Link to tracking Issue:
#3287 #3282

Testing:
Unit tests

Documentation:
Unit tests

@pavankrish123 pavankrish123 requested a review from a team May 25, 2021 17:15
@pavankrish123 pavankrish123 changed the title Refactored Jaeger exporter to move connection into start Refactored Jaeger exporter to move connection into start for upcoming Auth changes. May 25, 2021
@pavankrish123
Copy link
Contributor Author

pavankrish123 commented May 25, 2021

cc: @bogdandrutu @gramidt @jpkrohling

jpkrohling
jpkrohling previously approved these changes May 26, 2021
@jpkrohling jpkrohling dismissed their stale review May 26, 2021 09:54

Taking this back, see comment about the state reporter

@@ -264,7 +278,10 @@ func TestConnectionStateChange(t *testing.T) {
wg.Done()
})

require.NoError(t, sender.start(context.Background(), componenttest.NewNopHost()))
go func() {
sender.startConnectionStatusReporter()
Copy link
Member

Choose a reason for hiding this comment

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

This looks odd. Shouldn't you be calling start instead?

Copy link
Member

Choose a reason for hiding this comment

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

If not, you'd need a way to stop the connection reporter. Otherwise, it leaks resources between tests.

Copy link
Contributor Author

@pavankrish123 pavankrish123 May 26, 2021

Choose a reason for hiding this comment

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

Yeah, we need to call startConnectionStatusReporter explicitly, calling start will create actual grpc connection which we can't control the states. The cleanup in the next line calls the appropriate termination logic in startConnectionStatusReporter. I have added a signal to ensure we wait for the startConnectionStatusReporter comes to end,

@bogdandrutu
Copy link
Member

Please rebase

@bogdandrutu
Copy link
Member

@jpkrohling please revert this or file a new PR if anything is missing from here.

@bogdandrutu bogdandrutu merged commit 66c4908 into open-telemetry:main May 26, 2021
@pavankrish123 pavankrish123 deleted the refactor/jaeger branch May 27, 2021 05:30
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