Skip to content

access_log: add posibility to omit empty values for opentelemetry access log #30017

Closed as not planned

Description

@gray-oni

Title: access_log: add possibility to omit empty values for OpenTelemetry access log

Description:
Example of configuration

- name: envoy.access_loggers.open_telemetry
  typed_config:
    "@type": "type.googleapis.com/envoy.extensions.access_loggers.open_telemetry.v3.OpenTelemetryAccessLogConfig"
    common_config:
	  log_name: "otel_logs"
	  grpc_service:
		envoy_grpc:
		  cluster_name: "otel_collector"
  	    timeout: 3s
	body:
	  kvlist_value:
	    values:
		  - key: "key1"
		    value:
			  kvlist_value:
			    values:
				  - key: "protocol"
				    value:
					  string_value: "%PROTOCOL%"
				  - key: "field1"
				    value:
					  string_value: "%REQ(:X-FIELD-DOES-NOT-EXIST)%"
		  - key: "key2"
		    value:
			  string_value: "%REQ(:X-FIELD-DOES-NOT-EXIST)%"

With the current implementation properties field1 and key2 will be sent to OpenTelementry collector with value "-". An Access Log configuration with a large number of dynamic properties might produce a payload with a lot of properties having the default "-" value.

Proposal
Introduce omit_empty_values property the same as Envoy has for SubstitutionFormatString which will omit string properties from sending if it has the default value string "-". It would help reduce the Access Log payload sent to the OTEL collector and simplify log transformation on the collector side.

Activity

  1. added
    enhancement
    triage
    on Oct 8, 2023
  2. kyessenov commented on Oct 9, 2023

    @kyessenov
    Contributor

    IMHO, "-" is not a good default everywhere except the unstructured access logging. Related to this: #29876

  3. added and removed
    triage
    on Oct 9, 2023
  4. github-actions commented on Nov 8, 2023

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  5. added
    stale
    on Nov 8, 2023
  6. github-actions commented on Nov 15, 2023

    @github-actions

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

  7. kyessenov commented on Nov 20, 2023

    @kyessenov
    Contributor
  8. kyessenov commented on Nov 20, 2023

    @kyessenov
    Contributor

    /assign @TAOXUY

  9. removed
    stale
    on Nov 21, 2023
  10. github-actions commented on Dec 21, 2023

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  11. added
    stale
    on Dec 21, 2023
  12. github-actions commented on Dec 28, 2023

    @github-actions

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/access_logarea/opentelemetryenhancementstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions