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

critcal infos are exported from otel-agent- #229

Open
holiday-sunrise opened this issue Jan 14, 2025 · 4 comments
Open

critcal infos are exported from otel-agent- #229

holiday-sunrise opened this issue Jan 14, 2025 · 4 comments

Comments

@holiday-sunrise
Copy link

Mule Runtime is started with several command args like client_id, client_secret , encryptionkey. How can we filter those data in field "labels.process_command_args"

 labels.process_command_args=
/usr/lib64/jvm/temurin-17-jdk/bin/java
......
-Dencryption.key=XXXXXXXX
-Danypoint.platform.client_id=XXXXXXXX
-Danypoint.platform.client_secret=XXXXXXXX
.....
-Dwrapper.key=XXXXXXXX
....

security-relevant data should not be in the log

@holiday-sunrise
Copy link
Author

Any News

@manikmagar
Copy link
Contributor

Hi @holiday-sunrise. Resource providers collect process-related attributes. Here are a few options that you could do to exclude/update the attribute value -

  1. App level - Exclude the attribute using the SDK level using SDK system properties - otel.resource.disabled.keys
  2. Collector Configuration - Use Resource Processor in collector configuration to delete process.command_args attribute
  3. Collector Configuration - If process.command_args are needed but redact certain attribute values, then use Transform Processor with replace patterns in the collector configuration

I suggest using a processor/transformer at the collector configuration level to centralize the data conditioning from all apps.

@holiday-sunrise
Copy link
Author

holiday-sunrise commented Jan 21, 2025

Hi @manikmagar. Thank you for your answer.

Would it be possible to explain to me how I can use the Transformer with a Mule API and the Otel Mule Module.

Where and how would one create such a transformer.

I would be very happy about your help.

we will try it

@manikmagar
Copy link
Contributor

Hi @holiday-sunrise, the processor and transformer are not for the Otel Mule Module. Those are for OpenTelemetry collector configuration. Please see the documentation on the links below -

Collector Configuration - Use Resource Processor in collector configuration to delete process.command_args attribute

Collector Configuration - If process.command_args are needed but redact certain attribute values, then use Transform Processor with replace patterns in the collector configuration

Here is an example of deleting the attribute with resource processor -

.OpenTelemetry collector config yaml

... any existing configuration ....

processors:
  ... any existing processors ....
  resource/delete_process:
    attributes:
      - key: process.command_args
        action: delete

# Example traces service applying processor on the trace data       
service:
  pipelines:
    traces:
      receivers: [...]
      processors: [resource/delete_process]
      exporters: ....

I hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants