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

[chore] [exporter/alertmanagerexporter] Add exporter to components #30230

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

mcube8
Copy link
Member

@mcube8 mcube8 commented Dec 28, 2023

Description: Add Alertmanager Exporter to Components
Third PR - Update buildconfig and components

Link to tracking Issue: #23659

Testing: Unit tests for exporter

Documentation: Readme and Sample Configs to use Alertmanager exporter

@mcube8 mcube8 requested review from a team and bryan-aguilar December 28, 2023 14:22
@github-actions github-actions bot added the cmd/otelcontribcol otelcontribcol command label Dec 28, 2023
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

Replace statements are out of date, please run "make crosslink" and commit the changes in this PR.

@mcube8
Copy link
Member Author

mcube8 commented Dec 29, 2023

Replace statements are out of date, please run "make crosslink" and commit the changes in this PR.

Added a commit with the change, thank you.

@sokoide
Copy link
Member

sokoide commented Jan 11, 2024

Hello @bryan-aguilar, the PR needs one more review/approval. We'd appreciate your help!

Copy link
Contributor

@bryan-aguilar bryan-aguilar left a comment

Choose a reason for hiding this comment

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

Hi @sokoide,

For functional changes to PRs it is very helpful to have a codeowner approval on the PR. It gives collector approvers and maintainers, who may not be familiar with the component, more confidence in adding the ready to merge label on the PR.

Would you mind also reviewing the PR and adding your approval, comment, or change request?

Also, it looks like there are some merge conflicts that need to be resolved @mcube8

@@ -21,6 +21,7 @@ import (
"go.opentelemetry.io/collector/exporter/otlpexporter"
"go.opentelemetry.io/collector/exporter/otlphttpexporter"

alertmanagerexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that this requires a named import?

Comment on lines 269 to 283
{
exporter: "alertmanager",
getConfigFn: func() component.Config {
cfg := expFactories["alertmanager"].CreateDefaultConfig().(*alertmanagerexporter.Config)
cfg.HTTPClientSettings = confighttp.HTTPClientSettings{
Endpoint: "http://" + endpoint,
}
cfg.GeneratorURL = "opentelemetry-collector"
cfg.DefaultSeverity = "info"
// disable queue/retry to validate passing the test data synchronously
cfg.QueueSettings.Enabled = false
cfg.RetrySettings.Enabled = false
return cfg
},
expectConsumeErr: true,
},
Copy link
Contributor

@bryan-aguilar bryan-aguilar Jan 11, 2024

Choose a reason for hiding this comment

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

This lifecycle test should be added to your metadata.yaml file instead of explicitly in the builder config. mdatagen will then automatically generate the configuration in the component. See the schema doc for reference.

I'm going to mark this as a requirement to merge the PR so that we do not create more work for ourselves in the future. @atoulme is spearheading a lot of work to deprecate this test file by removing lifecycle tests to components.

Copy link
Contributor

Choose a reason for hiding this comment

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

Issue ref #27849

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

#30389 is merged. This bit of code can be removed once you rebase from main.

Copy link
Member

Choose a reason for hiding this comment

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

@bryan-aguilar, thank you for the review and merge. The feature itself has been merged by #27836 and #28906. I'm a co-owner of the feature, but I don't have a permission to add a tag or approve. If there is anything I can do, please suggest.
@mcube8 and I will take a look at #30389 and rebase. Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

@sokoide do you have the requisite permission to review PRs in the repository? I understand they won't be "green check mark" but even "grey check mark" helps. If you don't have permission for "grey check mark" review, then that may be an issue we need to raise.

Copy link
Member Author

Choose a reason for hiding this comment

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

@bryan-aguilar Thanks for your review. I updated the test config in metadata.yml under alertmanager exporter component. When removing above snippet from exporters_test, the unittest check failed.
Kindly suggest if any further changes are required, thanks!

@codeboten codeboten merged commit 2c7c039 into open-telemetry:main Jan 17, 2024
78 checks passed
@github-actions github-actions bot added this to the next release milestone Jan 17, 2024
mfyuce pushed a commit to mfyuce/opentelemetry-collector-contrib that referenced this pull request Jan 18, 2024
…pen-telemetry#30230)

Add Alertmanager Exporter to Components
Third PR - Update buildconfig and components

**Link to tracking Issue:**
[open-telemetry#23659](open-telemetry#23569)

**Testing:** Unit tests for exporter

**Documentation:** Readme and Sample Configs to use Alertmanager
exporter

---------

Co-authored-by: Alex Boten <aboten@lightstep.com>
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Feb 1, 2024
…pen-telemetry#30230)

Add Alertmanager Exporter to Components
Third PR - Update buildconfig and components

**Link to tracking Issue:**
[open-telemetry#23659](open-telemetry#23569)

**Testing:** Unit tests for exporter

**Documentation:** Readme and Sample Configs to use Alertmanager
exporter

---------

Co-authored-by: Alex Boten <aboten@lightstep.com>
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.

7 participants