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

[receiver/jmx] Add metric gatherer to artifacts #3262

Merged
merged 143 commits into from
Sep 7, 2023

Conversation

crobert-1
Copy link
Contributor

To properly support the jmx receiver in Docker, the dockerfile has to download the JMX metrics gatherer, and have it available to the collector. This change adds this functionality to the linux/macos dockerfile, as well as the windows dockerfile.

Also, adds an integration test getting metrics from a docker container.

cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
Copy link
Contributor

@jeffreyc-splunk jeffreyc-splunk left a comment

Choose a reason for hiding this comment

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

We should add some basic checks to https://github.com/signalfx/splunk-otel-collector/blob/main/.github/workflows/win-package-test.yml#L184 to verify installation of the jmx jar for the MSI.

cmd/otelcol/Dockerfile Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
@crobert-1 crobert-1 force-pushed the jmx_integration branch 2 times, most recently from 97964ca to a415c9c Compare July 18, 2023 00:36
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
@crobert-1
Copy link
Contributor Author

crobert-1 commented Jul 18, 2023

The integration test is dependent on an official collector release containing the changes made in this PR. The integration test is passing locally, but will fail in github CI until a new release of the Splunk distribution of the OpenTelemetry Collector is created.

For this reason, I'm going to remove the integration test, and once this PR is merged, submit a new PR with the integration test.

@jeffreyc-splunk
Copy link
Contributor

The integration test is dependent on an official collector release containing the changes made in this PR. The integration test is passing locally, but will fail in github CI until a new release of the Splunk distribution of the OpenTelemetry Collector is created.

For this reason, I'm going to remove the integration test, and once this PR is merged, submit a new PR with the integration test.

The integration test job does build the otelcol:latest image for the branch. Should the test be updated to use this local image instead?

@crobert-1
Copy link
Contributor Author

The integration test is dependent on an official collector release containing the changes made in this PR. The integration test is passing locally, but will fail in github CI until a new release of the Splunk distribution of the OpenTelemetry Collector is created.
For this reason, I'm going to remove the integration test, and once this PR is merged, submit a new PR with the integration test.

The integration test job does build the otelcol:latest image for the branch. Should the test be updated to use this local image instead?

Ah, you're right, the line here does what I needed. I'll add the test back in. I only saw the makefile was referring to quay's latest image and got turned around.

cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
@crobert-1 crobert-1 marked this pull request as ready for review July 28, 2023 18:20
@crobert-1 crobert-1 requested review from a team as code owners July 28, 2023 18:20
.github/workflows/win-package-test.yml Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile Outdated Show resolved Hide resolved
@jeffreyc-splunk
Copy link
Contributor

Are any docs required? At a minimum, I think we should document that the packages/images will install/include the jar.

@jeffreyc-splunk
Copy link
Contributor

Also, please add an entry to https://github.com/signalfx/splunk-otel-collector/blob/main/CHANGELOG.md.

To properly support the jmx receiver in Docker, the dockerfile has
to download the JMX metrics gatherer, and have it available to
the collector. This change adds this functionality to the linux/macos
dockerfile, as well as the windows dockerfile.

Also, adds an integration test getting metrics from a docker container.
- Update download URLs for consistency
- Remove unecessary data copies
- Fix file permissions
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@jeffreyc-splunk jeffreyc-splunk left a comment

Choose a reason for hiding this comment

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

Should the tar package also include the jar?

.gitlab/update-openjdk.sh Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile Outdated Show resolved Hide resolved
cmd/otelcol/Dockerfile.windows Outdated Show resolved Hide resolved
Co-authored-by: Jeff Cheng <83052155+jeffreyc-splunk@users.noreply.github.com>
@rmfitzpatrick
Copy link
Contributor

Should the tar package also include the jar?

Yes, makes sense. @crobert-1 do you mind looking into this?

@crobert-1
Copy link
Contributor Author

Should the tar package also include the jar?

I've added it to the TAR, and added a test to make sure it's there.

crobert-1 and others added 3 commits September 5, 2023 16:01
Co-authored-by: Ryan Fitzpatrick <10867373+rmfitzpatrick@users.noreply.github.com>
Co-authored-by: Ryan Fitzpatrick <10867373+rmfitzpatrick@users.noreply.github.com>
Co-authored-by: Ryan Fitzpatrick <10867373+rmfitzpatrick@users.noreply.github.com>
@crobert-1
Copy link
Contributor Author

Are any docs required? At a minimum, I think we should document that the packages/images will install/include the jar.

We currently don't have documentation for what's included in each package of the collector, but a jira issue has been opened to do the documentation work.

Copy link
Contributor

@jeffreyc-splunk jeffreyc-splunk left a comment

Choose a reason for hiding this comment

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

LGTM. Please rebase and resolve conflicts.

@atoulme atoulme merged commit 328fad4 into signalfx:main Sep 7, 2023
10 checks passed
@github-actions github-actions bot mentioned this pull request Jul 1, 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.

6 participants