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

[FEATURE]: Ability to hide queryString from generated spans #172

Open
sdwa0 opened this issue Feb 21, 2025 · 1 comment
Open

[FEATURE]: Ability to hide queryString from generated spans #172

sdwa0 opened this issue Feb 21, 2025 · 1 comment

Comments

@sdwa0
Copy link

sdwa0 commented Feb 21, 2025

Describe the goal of the feature

When we switched from an old version of ingress-nginx instrumented with nginx-opentracing module to using nginx-datadog , we noticed query parameters are appended to the http.url span attribute. Also, there is a new span attribute http.url_details.queryString that contains the list of all query parameter.

I am not sure if this is due to the switch to nginx-datadog though. I couldn't find a related difference in code between nginx-opentracing and nginx-datadog.

Regardless, an ability to hide query string from generated spans would be useful. There could be services that write PII data on query string, even though that is a bad security practice. An ability to hide it will avoid that from surfacing on Datadog.

Is your feature request related to a problem?

No response

Describe alternatives you've considered

No response

Additional context

No response

@dmehala
Copy link
Contributor

dmehala commented Feb 21, 2025

Hello @sdwa0,

Thank you for bringing this to our attention.

From what I understand, the module sends the full URL here, and the agent (or intake?) split it. I’m also surprised that query strings are not obfuscated by default, especially because the agent obfuscate some span metadata by default since v7.48.0.

I’d recommend reviewing the documentation on Trace Obfuscation here. From what I understand, you may need to update the agent configuration with the following:

apm_config:
  enabled: true
  obfuscation:
    http:
      ## Enables obfuscation of query strings in URLs. Disabled by default.
      remove_query_string: true
      remove_paths_with_digits: true

I hope this solves your issue. Keep me posted.

Thank you.

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