Skip to content

Add capture_content_types configuration option #51

@felixbarny

Description

@felixbarny

Description of the issue

I propose adding the following configuration option to our agents:

Key: capture_body_content_types
Type: List of wildcard matchers
Default: application/x-www-form-urlencoded*, text/*, application/json*, application/xml*
Description:

Configures which content types should be recorded.

The defaults end with a wildcard so that content types like text/plain; charset=utf-8 are captured as well.

Rationale

Users might only want to record certain content types, like application/json but don't want to record others, like binary data.

The Java agent can also be more efficient if it knows upfront whether it should record the request body. That is because it has to register a wrapper for the input stream which records and decodes the request body stream as it is read by the application.

Timeline

There's no specific timeline for implementing this configuration. But I hope we can agree on wether to add the option soon so that I can proceed with this PR: elastic/apm-agent-java#498

What we are voting on

@elastic/apm-agent-devs Please tick the box if you are ok with adding that configuration option.

If all are ok with adding the option, I'll create issues for each agent. You can then decide on your own about the priority.

Please tick the box if you are ok with some agents adding this configuration option

Vote

  • .NET
  • Go
  • Java
  • Node.js
  • Python
  • Ruby
  • RUM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions