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

http_endpoint: provide request tracing support #9909

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ vars:
basic_auth: true
username: abc123
password: abc123
enable_request_tracer: true
4 changes: 4 additions & 0 deletions packages/http_endpoint/agent/input/http.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ tags:
{{#contains "forwarded" tags}}
publisher_pipeline.disable_host: true
{{/contains}}
{{#if enable_request_tracer}}
tracer.filename: "../../logs/http_endpoint/http-request-trace-*.ndjson"
tracer.maxbackups: 5
{{/if}}
{{#if processors}}
processors:
{{processors}}
Expand Down
5 changes: 4 additions & 1 deletion packages/http_endpoint/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
- version: "2.0.0-next" # Merge into next version and delete this and the following line.
- version: "2.1.0"
changes:
- description: Provide request tracing support.
type: enhancement
link: https://github.com/elastic/integrations/pull/9909
- description: Added test for end-to-end ACK behaviour.
type: enhancement
link: https://github.com/elastic/integrations/pull/9843
Expand Down
12 changes: 10 additions & 2 deletions packages/http_endpoint/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: http_endpoint
title: Custom HTTP Endpoint Logs
description: Collect JSON data from listening HTTP port with Elastic Agent.
type: input
version: "2.0.0"
version: "2.1.0"
conditions:
kibana:
version: "^8.12.0"
version: "^8.14.0"
categories:
- custom
- observability
Expand Down Expand Up @@ -193,6 +193,14 @@ policy_templates:
- forwarded
multi: true
show_user: true
- name: enable_request_tracer
type: bool
title: Enable request tracing
multi: false
required: false
show_user: false
description: >
The request tracer logs HTTP requests and responses to the agent's local file-system for debugging configurations. Enabling this request tracing compromises security and should only be used for debugging. See [documentation](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-cel.html#_resource_tracer_filename) for details.
icons:
- src: "/img/icon.svg"
type: "image/svg+xml"
Expand Down