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

[receiver/pulsar] do not expose method #27029

Merged
merged 14 commits into from
Oct 4, 2023

Conversation

sakulali
Copy link
Contributor

@sakulali sakulali commented Sep 20, 2023

Description:
Do not export functions WithLogsUnmarshalers, WithMetricsUnmarshalers, WithTracesUnmarshalers, add tests for that and pass checkapi

Link to tracking Issue:
#26304

Testing:
go run cmd/checkapi/main.go .
make chlog-validate
go test for pulsarreceiver

Documentation:

component: pulsarreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Do not export the function `WithLogsUnmarshalers`, `WithMetricsUnmarshalers`, `WithTracesUnmarshalers` and pass checkapi.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is removing the methods altogether, not just making them private

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, i wrote an incorrect description, thanks for reviews @codeboten!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@sakulali sakulali changed the title [receiver/pulsar] do not expose method [receiver/pulsar] remove the unused functions and pass checkapi Sep 21, 2023
}
}
}

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about this removal. This can be actually used along with TracesUnmarshaler, FactoryOption and others. Let's start with deprecating them and see it people complain. Please create a separate issue for this removal where potential users can comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry, i made a mistake again and accidentally deleted a feature with FactoryOption. Thanks for reviews and thoughtful suggestion @dmitryax!

@@ -26,33 +26,6 @@ const (
// FactoryOption applies changes to PulsarExporterFactory.
type FactoryOption func(factory *pulsarReceiverFactory)
Copy link
Member

Choose a reason for hiding this comment

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

@atoulme, looks like the checkapi tool missed FactoryOption, TracesUnmarshaler, MetricsUnmarshaler and LogsUnmarshaler. Is this expected?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes it is. For now, the checkapi tool only checks functions, not types. We can add that next but it's more complicated, as Config structs must be exported.

@sakulali sakulali changed the title [receiver/pulsar] remove the unused functions and pass checkapi [receiver/pulsar] do not expose method Sep 21, 2023
@atoulme atoulme added the ready to merge Code review completed; ready to merge by maintainers label Sep 28, 2023
Copy link
Member

@dao-jun dao-jun left a comment

Choose a reason for hiding this comment

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

lgtm

@mx-psi mx-psi merged commit 64ae47c into open-telemetry:main Oct 4, 2023
97 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 4, 2023
@sakulali sakulali deleted the fix-pulsarreceiver-api branch November 2, 2023 13:59
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
**Description:** 
Do not export functions `WithLogsUnmarshalers`,
`WithMetricsUnmarshalers`, `WithTracesUnmarshalers`, add tests for that
and pass checkapi

**Link to tracking Issue:**

open-telemetry#26304

**Testing:** 
go run cmd/checkapi/main.go .
make chlog-validate
go test for pulsarreceiver

**Documentation:**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers receiver/pulsar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants