Skip to content

[cloudflarereceiver] Allow receiving all log attributes without manually specifying fields #37720

Closed
@petern48

Description

@petern48

Component(s)

receiver/cloudflare

Is your feature request related to a problem? Please describe.

Currently, if we want to receive attributes from cloudflare logpush. We need to specify the attributes manually in the config file. Cloudflare logpush already gives us the option to specify which attributes are sent. Therefore, it's often unnecessary to manually specify (again) which attributes to receive because we simply want to ingest everything that is sent.

receivers:
  cloudflare:
    logs:
      tls:
        key_file: some_key_file
        cert_file: some_cert_file
      endpoint: 0.0.0.0:12345
      secret: 1234567890abcdef1234567890abcdef
      timestamp_field: EdgeStartTimestamp
      attributes:
        ClientIP: http_request.client_ip
        ClientRequestURI: http_request.uri

^ src

Describe the solution you'd like

I'm proposing a new convention where if the attributes field is empty, then it indicates we want to ingest everything that is sent. This helps users avoid having to modify which fields they want in two places. Happy to submit a PR myself.

receivers:
  cloudflare:
    logs:
      tls:
        key_file: some_key_file
        cert_file: some_cert_file
      endpoint: 0.0.0.0:12345
      secret: 1234567890abcdef1234567890abcdef
      timestamp_field: EdgeStartTimestamp
      attributes:
          # empty. no attributes specified -> receive all attributes that are sent

Describe alternatives you've considered

No response

Additional context

No response

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