SigNoz Cloud - This page is relevant for SigNoz Cloud editions.
Self-Host - This page is relevant for self-hosted SigNoz editions.

Remove Resource Attributes

Resource attributes provide additional contextual information about the source of your logs, such as service name, host details, and process information. You can remove unwanted resource attributes either at the source (Agent/SDK) or at the OpenTelemetry Collector level.

Why remove Resource Attributes?

  • Reduce Data Volume: Removing resource attributes can help reduce the volume of data stored in your log storage system.
  • Cost Optimization: Reducing the amount of data stored can help optimize your storage costs.
  • Improved Query Performance: Removing resource attributes can improve query performance by reducing the number of unique attribute values.
  • Security/Privacy: Some attributes may contain sensitive information that shouldn't be exported.

Removing Resource Attributes at the Collector Level

The OpenTelemetry Collector provides a Resource Processor which can be used to delete specific attributes from all incoming data.

1. Add Resource Processor

In your OpenTelemetry Collector configuration file, add a resource processor with delete action to remove specific attributes.

otel-collector-config.yaml
processors:
  resource/remove_attributes:
    attributes:
      - key: process.command_line
        action: delete

In the example above, the process.command_line attribute will be removed from all logs processed by this pipeline.

📝 Note

Ensure you verify the key name exactly matches the attribute you wish to remove.

2. Add the processor to your pipeline

Ensure it is listed in the processors section of your logs pipeline.

otel-collector-config.yaml
service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [resource/remove_attributes, batch]
      exporters: [otlp]

This configuration will ensure process.command_line is removed from all logs processed by this pipeline, regardless of the source SDK.

For more details on configuring the OpenTelemetry Collector, see the OTel Collector configuration guide.

OpenTelemetry Java (SDK & Agent)

The otel.resource.disabled.keys configuration property allows you to filter out specific resource attributes. This is a general SDK configuration property that works for both the OpenTelemetry Java SDK and the OpenTelemetry Java Agent.

Using System Properties

You can pass the filter as a system property when starting your application, for example:

java -javaagent:/path/to/opentelemetry-javaagent.jar \
     -Dotel.resource.disabled.keys=process.command_line \
     -jar myapp.jar

This will remove the process.command_line attribute from all logs generated by your application.

Using Environment Variables

You can also use the OTEL_RESOURCE_DISABLED_KEYS environment variable:

export OTEL_RESOURCE_DISABLED_KEYS=process.command_line
java -javaagent:/path/to/opentelemetry-javaagent.jar -jar myapp.jar

This will remove the process.command_line attribute from all logs generated by your application.

📝 Note

To disable multiple attributes, provide a comma-separated list of attribute keys, for example:

export OTEL_RESOURCE_DISABLED_KEYS=process.command_line,process.command_args
⚠️ Warning

Limitations: Certain mandatory resource attributes defined by the OpenTelemetry specification (such as telemetry.sdk.name, telemetry.sdk.version, etc.) cannot be disabled through this configuration. Removing these requires a custom agent extension.

Other Languages

The OTEL_RESOURCE_DISABLED_KEYS configuration is currently specific to the OpenTelemetry Java SDK and Agent. Other SDKs do not support filtering specific attributes via this environment variable. For these languages, use the Collector-level approach described above, which works universally for all SDKs.

Validate

To verify that the resource attributes have been removed:

  1. Generate some logs from your application.
  2. Go to the Logs tab in SigNoz.
  3. Select a log line and check the Resource Attributes section in the details pane.
  4. Confirm that process.command_line (or your filtered attribute) is no longer present.

Get Help

If you need help with the steps in this topic, please reach out to us on SigNoz Community Slack.

If you are a SigNoz Cloud user, please use in product chat support located at the bottom right corner of your SigNoz instance or contact us at cloud-support@signoz.io.

Last updated: December 28, 2025

Edit on GitHub

Was this page helpful?