-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Cloud Security] [Agentless] Improving error log metadata and sending APM trace id #192235
Conversation
/ci |
/ci |
/ci |
/ci |
/ci |
1 similar comment
/ci |
/ci |
/ci |
/ci |
/ci |
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
/ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM 🚀
Pinging @elastic/fleet (Team:Fleet) |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
… APM trace id (elastic#192235) ## Summary This PR includes a few improvements in the communication between Kibana and the Agentless API. - Adding a `X-Request-ID` Header on all HTTP calls from the Kibana server to the Agentless API. X-Request-ID is the [currentTraceparent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html#apm-current-traceparent) string captured from Apm Service and is unique per request. - Also, this PR enhances some error logs metadata with the relevant fields, and all documents logged to ES also includes the [trace.id](https://www.elastic.co/guide/en/ecs/8.11/ecs-tracing.html) field - Also this PR redacts the fleet token sent to the debug logs to prevent credential leaking (cherry picked from commit 10bcc62)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ending APM trace id (#192235) (#193901) # Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] [Agentless] Improving error log metadata and sending APM trace id (#192235)](#192235) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Paulo Silva","email":"paulo.henrique@elastic.co"},"sourceCommit":{"committedDate":"2024-09-24T16:56:03Z","message":"[Cloud Security] [Agentless] Improving error log metadata and sending APM trace id (#192235)\n\n## Summary\r\n\r\nThis PR includes a few improvements in the communication between Kibana\r\nand the Agentless API.\r\n\r\n- Adding a `X-Request-ID` Header on all HTTP calls from the Kibana\r\nserver to the Agentless API. X-Request-ID is the\r\n[currentTraceparent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html#apm-current-traceparent)\r\nstring captured from Apm Service and is unique per request.\r\n- Also, this PR enhances some error logs metadata with the relevant\r\nfields, and all documents logged to ES also includes the\r\n[trace.id](https://www.elastic.co/guide/en/ecs/8.11/ecs-tracing.html)\r\nfield\r\n- Also this PR redacts the fleet token sent to the debug logs to prevent\r\ncredential leaking","sha":"10bcc626ecb1d8bf77f5a4d95d4d85f5e094d782","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","Team:Cloud Security","v8.16.0","backport:version"],"title":"[Cloud Security] [Agentless] Improving error log metadata and sending APM trace id","number":192235,"url":"https://github.com/elastic/kibana/pull/192235","mergeCommit":{"message":"[Cloud Security] [Agentless] Improving error log metadata and sending APM trace id (#192235)\n\n## Summary\r\n\r\nThis PR includes a few improvements in the communication between Kibana\r\nand the Agentless API.\r\n\r\n- Adding a `X-Request-ID` Header on all HTTP calls from the Kibana\r\nserver to the Agentless API. X-Request-ID is the\r\n[currentTraceparent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html#apm-current-traceparent)\r\nstring captured from Apm Service and is unique per request.\r\n- Also, this PR enhances some error logs metadata with the relevant\r\nfields, and all documents logged to ES also includes the\r\n[trace.id](https://www.elastic.co/guide/en/ecs/8.11/ecs-tracing.html)\r\nfield\r\n- Also this PR redacts the fleet token sent to the debug logs to prevent\r\ncredential leaking","sha":"10bcc626ecb1d8bf77f5a4d95d4d85f5e094d782"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192235","number":192235,"mergeCommit":{"message":"[Cloud Security] [Agentless] Improving error log metadata and sending APM trace id (#192235)\n\n## Summary\r\n\r\nThis PR includes a few improvements in the communication between Kibana\r\nand the Agentless API.\r\n\r\n- Adding a `X-Request-ID` Header on all HTTP calls from the Kibana\r\nserver to the Agentless API. X-Request-ID is the\r\n[currentTraceparent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html#apm-current-traceparent)\r\nstring captured from Apm Service and is unique per request.\r\n- Also, this PR enhances some error logs metadata with the relevant\r\nfields, and all documents logged to ES also includes the\r\n[trace.id](https://www.elastic.co/guide/en/ecs/8.11/ecs-tracing.html)\r\nfield\r\n- Also this PR redacts the fleet token sent to the debug logs to prevent\r\ncredential leaking","sha":"10bcc626ecb1d8bf77f5a4d95d4d85f5e094d782"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Paulo Silva <paulo.henrique@elastic.co>
Summary
This PR includes a few improvements in the communication between Kibana and the Agentless API.
X-Request-ID
Header on all HTTP calls from the Kibana server to the Agentless API. X-Request-ID is the currentTraceparent string captured from Apm Service and is unique per request.