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

[exporter/signalfx] Update code to use HTTPClientSettings #6803

Closed

Conversation

manang-splunk
Copy link
Contributor

Description: Updated the signalfx exporter(metrics and logs) to use HTTPClientSettings to create HttpClient.

Testing: Updated the test cases as per new changes

@jpkrohling jpkrohling changed the title updated code to use HTTPClientSettings in signalfx exporter updated code to use HTTPClientSettings Dec 16, 2021
@jpkrohling jpkrohling changed the title updated code to use HTTPClientSettings [exporter/signalfx] updated code to use HTTPClientSettings Dec 16, 2021
@jpkrohling jpkrohling changed the title [exporter/signalfx] updated code to use HTTPClientSettings [exporter/signalfx] Update code to use HTTPClientSettings Dec 16, 2021
Copy link
Contributor

@MovieStoreGuy MovieStoreGuy left a comment

Choose a reason for hiding this comment

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

I worry that this is some unrelated changes going in and would make it harder to debug tests in future.

@manang-splunk manang-splunk force-pushed the signalfx-exporter branch 2 times, most recently from 72bf05c to 49e4fb8 Compare January 13, 2022 06:24
Comment on lines 137 to 145
{
name: "negative_duration",
config: &Config{
ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)),
AccessToken: "testToken",
Realm: "lab",
TimeoutSettings: exporterhelper.TimeoutSettings{Timeout: -2 * time.Second},
ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)),
AccessToken: "testToken",
Realm: "lab",
HTTPClientSettings: confighttp.HTTPClientSettings{Timeout: -2 * time.Second},
},
errorMessage: "failed to process \"signalfx\" config: cannot have a negative \"timeout\"",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also include a test for zero duration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This unit test is for testing failure, but as per current implementation for zero value we will not get an error and therefore we think we should not add it in this test. As the scope of this PR was to refactor the code to use HTTPConfigSettings, we haven’t changed the main implementation logic of this.
@dmitryax Please share your thoughts.

Copy link
Contributor

Choose a reason for hiding this comment

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

A zero value is an interesting case since if directly setting the raw http client mean that the server must immediately return a result (which is physically possible) so it should be considered an error :)

Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

Please address comment from @MovieStoreGuy, otherwise LGTM

@github-actions
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 the Stale label Feb 16, 2022
@dmitryax dmitryax removed the Stale label Feb 16, 2022
@MovieStoreGuy
Copy link
Contributor

@manang-splunk , are you still working on this PR?

@github-actions
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 the Stale label Mar 14, 2022
@dmitryax dmitryax removed the Stale label Mar 14, 2022
@github-actions
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 the Stale label Mar 29, 2022
@dmitryax dmitryax removed the Stale label Mar 29, 2022
@github-actions
Copy link
Contributor

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

@github-actions
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 the Stale label May 12, 2022
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this May 27, 2022
povilasv referenced this pull request in coralogix/opentelemetry-collector-contrib Dec 19, 2022
Signed-off-by: Bogdan Drutu <[email protected]>

Signed-off-by: Bogdan Drutu <[email protected]>

Signed-off-by: Bogdan Drutu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants