Skip to content

Add export traces to gcs#44945

Merged
atoulme merged 10 commits intoopen-telemetry:mainfrom
nosportugal:copilot/add-export-traces-to-gcs
Jan 24, 2026
Merged

Add export traces to gcs#44945
atoulme merged 10 commits intoopen-telemetry:mainfrom
nosportugal:copilot/add-export-traces-to-gcs

Conversation

@gafda
Copy link
Contributor

@gafda gafda commented Dec 15, 2025

This pull request adds support for exporting traces, in addition to logs, to Google Cloud Storage in the googlecloudstorageexporter. It updates the configuration, implementation, and tests to handle traces, and improves how encoding extensions are loaded for both logs and traces.

Traces Export Support:

  • Added support for exporting traces alongside logs, including implementation of ConsumeTraces, trace marshaling, and registration of the traces exporter. [1] [2] [3] [4] [5]

Configuration and Documentation Updates:

  • Updated the README.md and metadata.yaml to reflect support for traces and clarify how the encoding option works for both logs and traces. [1] [2] [3]

Configuration Handling Improvements:

  • Changed the Encoding field in the config struct from a pointer to a value, simplifying usage and reducing nil checks. [1] [2]

Testing Enhancements:

  • Added and updated tests to cover traces export, including new mock marshalers for traces and both signals, and additional test cases for encoding extension scenarios. [1] [2] [3] [4] [5] [6]

Configuration Example:

exporters:
  # ...
  googlecloudstorage/traces:
    # ...
    bucket:
      name: "YOUR_BUCKET_NAME"
      project_id: "YOUR_GCP_PROJECT_ID"
      region: "YOUR_BUCKET_REGION"
      # ...

  googlecloudstorage/logs:
    # ...
    bucket:
      name: "YOUR_BUCKET_NAME"
      project_id: "YOUR_GCP_PROJECT_ID"
      region: "YOUR_BUCKET_REGION"
      # ...

@gafda gafda requested review from a team and braydonk as code owners December 15, 2025 14:21
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 15, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Dec 15, 2025
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

Copy link
Contributor

@constanca-m constanca-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution Gil, usually it is best to start with opening an issue instead of opening the PR already, just to make sure we can have agreement before implementation.

The PR looks good in general, just a couple of concerns

@gafda gafda force-pushed the copilot/add-export-traces-to-gcs branch 3 times, most recently from 8ff9140 to 4a98624 Compare December 18, 2025 17:14
@gafda gafda requested a review from constanca-m December 19, 2025 17:00
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 6, 2026
@gafda gafda force-pushed the copilot/add-export-traces-to-gcs branch from 4a98624 to d2529dc Compare January 12, 2026 12:18
@gafda
Copy link
Contributor Author

gafda commented Jan 12, 2026

@constanca-m, I'm sorry I took too long to fix your review comments. I've been sick for a while.
Hope everything is in order now.

@gafda gafda force-pushed the copilot/add-export-traces-to-gcs branch from f92dc8c to 0efa8e4 Compare January 12, 2026 17:53
@github-actions github-actions bot removed the Stale label Jan 13, 2026
Copy link
Contributor

@constanca-m constanca-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, almost there

@gafda gafda force-pushed the copilot/add-export-traces-to-gcs branch from 0efa8e4 to a7d5d43 Compare January 14, 2026 13:47
@gafda
Copy link
Contributor Author

gafda commented Jan 14, 2026

I've also rebased this branch with the latest commits from the main branch.

Copy link
Contributor

@constanca-m constanca-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gafda, looks good

@gafda gafda force-pushed the copilot/add-export-traces-to-gcs branch 5 times, most recently from 7e7e380 to e8e944d Compare January 22, 2026 10:42
@constanca-m
Copy link
Contributor

@gafda You need to fix the lint errors for the PR to get merged

@gafda gafda force-pushed the copilot/add-export-traces-to-gcs branch from e8e944d to f9378be Compare January 23, 2026 19:06
Copilot AI and others added 10 commits January 23, 2026 19:08
Co-authored-by: ctorrao <22594902+ctorrao@users.noreply.github.com>
Co-authored-by: ctorrao <22594902+ctorrao@users.noreply.github.com>
… usage in exporter

feat: enhance OpenTelemetry collector configuration with Prometheus support and improved metrics handling
- Simplify early-return pattern in traces marshaler loading
- Remove unused parameter from loadExtension function
- Fix struct field formatting in test file
- Add changelog entry for traces export support
@gafda gafda force-pushed the copilot/add-export-traces-to-gcs branch from f9378be to ba9464d Compare January 23, 2026 19:10
@gafda
Copy link
Contributor Author

gafda commented Jan 23, 2026

@constanca-m This branch is now up-to-date with main after a rebase. I've also run make golint and resolved all reported issues. The updated code has been pushed.

@atoulme atoulme added the ready to merge Code review completed; ready to merge by maintainers label Jan 24, 2026
@atoulme atoulme merged commit 07fdb0c into open-telemetry:main Jan 24, 2026
207 checks passed
@otelbot
Copy link
Contributor

otelbot bot commented Jan 24, 2026

Thank you for your contribution @gafda! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help.

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

Labels

exporter/googlecloudstorage first-time contributor PRs made by new contributors ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants