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

Disable tracer by default #18339

Merged
merged 2 commits into from
May 7, 2020
Merged

Conversation

jalvz
Copy link
Contributor

@jalvz jalvz commented May 7, 2020

What does this PR do?

This is a follow up of #17938

I made a wrong assumption there: If there is no ELASTIC_APM_ACTIVE env var, then the tracer is active.

This PR reverts that behaviour to make it opt-in, instead opt-out.

This needs backport to 7.x and 7.8

Why is it important?

Because otherwise users will be required to have an APM Server running locally on a minor upgrade.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

Run any beat and check there are not outgoing connections to localhost:8200

@jalvz jalvz added bug Team:apm APM Server team issues/PRs v7.8.0 labels May 7, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 7, 2020
@jalvz jalvz requested review from urso and ycombinator May 7, 2020 08:44
// an APM Server running, making it opt-in
if os.Getenv("ELASTIC_APM_ACTIVE") == "" {
os.Setenv("ELASTIC_APM_ACTIVE", "false")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: now that there are a couple of APM-related initialization statements here in the init() function, maybe move them into their own function like initRand()?

Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Left a nit but otherwise LGTM. Thanks for fixing!

@elasticmachine
Copy link
Collaborator

elasticmachine commented May 7, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 7759
Skipped 1236
Total 8995

@jalvz jalvz merged commit 60d1bd0 into elastic:master May 7, 2020
jalvz added a commit to jalvz/beats that referenced this pull request May 7, 2020
jalvz added a commit to jalvz/beats that referenced this pull request May 7, 2020
jalvz added a commit that referenced this pull request May 11, 2020
jalvz added a commit that referenced this pull request May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs_team Indicates that the issue/PR needs a Team:* label Team:apm APM Server team issues/PRs v7.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants