Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

fix: Redact sensitive data from OTEL traces and fix env var parsing - #1553

Merged
chandra-siri merged 7 commits into
mainfrom
fix_hide_sensitive_query_keys
Oct 22, 2025
Merged

fix: Redact sensitive data from OTEL traces and fix env var parsing#1553
chandra-siri merged 7 commits into
mainfrom
fix_hide_sensitive_query_keys

Conversation

@rajeevpodar

@rajeevpodarrajeevpodar commented Sep 24, 2025

Copy link
Copy Markdown
Collaborator

fix: Redact sensitive data from OTEL traces and fix env var parsing

Summary

This PR addresses two key improvements:

  1. Redaction of Sensitive Data in OTEL Traces:

    • Ensures that sensitive information (such as authentication tokens, secret values, etc.) is not captured or exposed in OpenTelemetry traces.
    • Applies systematic filtering and redaction to both HTTP request and response data included in trace spans.
  2. Robust Environment Variable Parsing:

    • Fixes and simplifies the logic for parsing environment variables to avoid misconfigurations and potential runtime errors.

Details

  • The implementation closely follows the OpenTelemetry HTTP semantic conventions, ensuring that all HTTP spans generated by the library are compliant.
  • All relevant HTTP attributes in traces are set according to the specification, while omitting or redacting values that are considered sensitive.
  • Includes tests and documentation updates to reflect the improved behavior.

Motivation

  • Security: Preventing leakage of sensitive information via telemetry is essential for compliance and user trust.
  • Standardization: Aligning with OpenTelemetry semantic conventions improves interoperability with observability tools and makes traces easier to understand and analyze.

Related Links


Please let me know if further changes or clarifications are needed.

@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. api: storage Issues related to the googleapis/python-storage API. labels Sep 24, 2025
@chandra-sirichandra-siri self-assigned this Sep 24, 2025
@rajeevpodar
rajeevpodarforce-pushed the fix_hide_sensitive_query_keys branch from 7c4be24 to 91f04b2CompareSeptember 25, 2025 04:36
@rajeevpodar
rajeevpodar marked this pull request as ready for review September 25, 2025 04:48
@rajeevpodar
rajeevpodar requested review from a teamSeptember 25, 2025 04:48
@chandra-sirichandra-siri added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 25, 2025
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 25, 2025
Comment threadgoogle/cloud/storage/_opentelemetry_tracing.py
Comment threadtests/unit/test__opentelemetry_tracing.py
Comment threadgoogle/cloud/storage/_opentelemetry_tracing.py
Comment threadtests/unit/test__opentelemetry_tracing.py
chandra-siri
chandra-siri previously approved these changes Oct 22, 2025
@product-auto-labelproduct-auto-labelBot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Oct 22, 2025
@chandra-siri
chandra-siri merged commit a38ca19 into mainOct 22, 2025
15 checks passed
@chandra-siri
chandra-siri deleted the fix_hide_sensitive_query_keys branch October 22, 2025 12:00
@release-pleaserelease-pleaseBot mentioned this pull request Oct 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storageIssues related to the googleapis/python-storage API.size: lPull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@rajeevpodar@chandra-siri