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

V2: Provide fleet configuration to APM server #1745

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

aleksmaus
Copy link
Member

What does this PR do?

Injects the fleet configuration for APM the same way it was done for Endpoint.
Tested against APM PR for V2 elastic/apm-server#9544

Why is it important?

Fixes Agent with APM for V2.

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.

Related issues

Logs

The following is the APM input configuration captured in apm-server built off of the PR elastic/apm-server#9544

{
    "apm-server": {
        "agent_config": [],
        "aggregation": {
            "service": {
                "enabled": false
            }
        },
        "auth": {
            "anonymous": {
                "allow_agent": [
                    "rum-js",
                    "js-base",
                    "iOS/swift"
                ],
                "allow_service": null,
                "enabled": true,
                "rate_limit": {
                    "event_limit": 300,
                    "ip_limit": 1000
                }
            },
            "api_key": {
                "enabled": false,
                "limit": 100
            },
            "secret_token": null
        },
        "capture_personal_data": true,
        "default_service_environment": null,
        "expvar": {
            "enabled": false
        },
        "host": "localhost:8255",
        "idle_timeout": "45s",
        "java_attacher": {
            "discovery-rules": null,
            "download-agent-version": null,
            "enabled": false
        },
        "max_connections": 0,
        "max_event_size": 307200,
        "max_header_size": 1048576,
        "pprof": {
            "enabled": false
        },
        "read_timeout": "3600s",
        "response_headers": null,
        "rum": {
            "allow_headers": null,
            "allow_origins": [
                "*"
            ],
            "enabled": true,
            "exclude_from_grouping": "^/webpack",
            "library_pattern": "node_modules|bower_components|~",
            "response_headers": null,
            "source_mapping": {
                "metadata": []
            }
        },
        "sampling": {
            "tail": {
                "enabled": false,
                "interval": "1m",
                "policies": [
                    {
                        "sample_rate": 0.1
                    }
                ],
                "storage_limit": "3GB"
            }
        },
        "shutdown_timeout": "30s",
        "ssl": {
            "certificate": null,
            "cipher_suites": null,
            "curve_types": null,
            "enabled": false,
            "key": null,
            "key_passphrase": null,
            "supported_protocols": [
                "TLSv1.1",
                "TLSv1.2",
                "TLSv1.3"
            ]
        },
        "write_timeout": "30s"
    },
    "data_stream": {
        "namespace": "default"
    },
    "fleet": {
        "access_api_key": "xxxxxxdvUUJITm80OFQyb1YwOU86clBNalZ2ZjNUM0M5a0U2SEgzc2N4Zw==",
        "agent": {
            "id": "ea466602-1c24-4704-8054-28fbacbf3e96"
        },
        "enabled": true,
        "host": {
            "id": "2628AB39-F770-5FC3-B7F1-8CC95E506B0D"
        },
        "hosts": [
            "https://ffffe9b5f47d409099163e5e8e5e4f4e.fleet.us-west2.gcp.elastic-cloud.com:443"
        ],
        "protocol": "http",
        "ssl": {
            "renegotiation": "never",
            "verification_mode": "full"
        },
        "timeout": "10m0s"
    },
    "id": "a055c8da-5886-4989-b969-8b6674666711",
    "meta": {
        "package": {
            "name": "apm",
            "version": "8.6.0"
        }
    },
    "name": "apm-1",
    "package_policy_id": "a055c8da-5886-4989-b969-8b6674666711",
    "policy": {
        "revision": 3
    },
    "revision": 2,
    "type": "apm"
}

@aleksmaus aleksmaus added bug Something isn't working backport-v8.6.0 Automated backport with mergify labels Nov 17, 2022
@aleksmaus aleksmaus requested a review from cmacknz November 17, 2022 00:48
@aleksmaus aleksmaus requested a review from a team as a code owner November 17, 2022 00:48
@aleksmaus aleksmaus requested review from blakerouse and removed request for a team November 17, 2022 00:48
Copy link
Member

@cmacknz cmacknz left a comment

Choose a reason for hiding this comment

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

Thanks for doing this so quickly!

@cmacknz
Copy link
Member

cmacknz commented Nov 17, 2022

@axw FYI

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-11-17T00:48:37.898+0000

  • Duration: 18 min 15 sec

Test stats 🧪

Test Results
Failed 0
Passed 4481
Skipped 13
Total 4494

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.305% (58/59) 👍
Files 71.066% (140/197) 👍
Classes 70.557% (266/377) 👍
Methods 54.834% (794/1448) 👍
Lines 40.259% (8566/21277) 👎 -0.033
Conditionals 100.0% (0/0) 💚

@aleksmaus aleksmaus merged commit 969c18a into elastic:main Nov 17, 2022
mergify bot pushed a commit that referenced this pull request Nov 17, 2022
axw pushed a commit that referenced this pull request Nov 17, 2022
(cherry picked from commit 969c18a)

Co-authored-by: Aleksandr Maus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.6.0 Automated backport with mergify bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V2: Provide fleet configuration to APM server
3 participants