-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[podmanreceiver] add scraper's shutdown method #32981
Changes from all commits
1b6095d
6c4d2e5
08397a8
2bf6a4a
6b568e2
9a82696
c00c4a5
4e6da95
e86e8c6
50419a1
863440d
31624bb
18d216c
21a0e55
985ae06
5bdfd32
cc020d2
0bd42e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: bug_fix | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: podmanreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: add scraper's shutdown method | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [29994] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,27 @@ import ( | |
"context" | ||
"fmt" | ||
|
||
"go.opentelemetry.io/collector/component" | ||
"go.opentelemetry.io/collector/consumer" | ||
"go.opentelemetry.io/collector/receiver" | ||
) | ||
|
||
func newMetricsReceiver( | ||
_ context.Context, | ||
_ receiver.CreateSettings, | ||
_ *Config, | ||
_ consumer.Metrics, | ||
_ any, | ||
) (receiver.Metrics, error) { | ||
return nil, fmt.Errorf("podman receiver is not supported on windows") | ||
} | ||
|
||
func createMetricsReceiver( | ||
_ context.Context, | ||
params receiver.CreateSettings, | ||
config component.Config, | ||
consumer consumer.Metrics, | ||
) (receiver.Metrics, error) { | ||
podmanConfig := config.(*Config) | ||
|
||
return newMetricsReceiver(params, podmanConfig, nil, consumer) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why bother to have the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense to me, I was thinking to even remove the |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you calling
Config.Validate
in the component start function? I don't think this function should be called by component authors. It is called for each component during collector setup:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I will open a PR to remove it