Skip to content

Add documentation example for processor package (#5675) #13070

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

heitorganzeli
Copy link
Contributor

Description

This PR introduces a testable example to the package processor. it's a similar example to the documentation one on https://opentelemetry.io/docs/collector/building/receiver/#designing-and-validating-receiver-settings

Issue: #5675 (comment)

Testing

the testable example was executed successfully:

image

Documentation

this testable example follows https://go.dev/blog/examples#larger-examples format and should be automatically added to processor package documentation

@heitorganzeli heitorganzeli requested review from a team, mx-psi, dmathieu and dmitryax as code owners May 21, 2025 16:15
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.61%. Comparing base (dc3f5d2) to head (8e65c5f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13070   +/-   ##
=======================================
  Coverage   91.61%   91.61%           
=======================================
  Files         505      505           
  Lines       28409    28409           
=======================================
  Hits        26027    26027           
  Misses       1873     1873           
  Partials      509      509           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

Choose a reason for hiding this comment

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

Based on the go.mod changes, I wonder if it's better to have this as a processorhelper example instead?

Copy link
Contributor Author

@heitorganzeli heitorganzeli May 22, 2025

Choose a reason for hiding this comment

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

i can move it there.

but, as a guideline, what do you think would be the default way to build processors?

as a new guy, processorhelper seemed like a more streamline way of doing it.

maybe processor should have two examples, one without and one with it (or a link to the one on processorhelper)

@heitorganzeli heitorganzeli force-pushed the processor_example branch 3 times, most recently from 75d0bb3 to eee00d0 Compare May 22, 2025 09:20
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

Successfully merging this pull request may close these issues.

2 participants