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

Add device filter for file system scraper #1379

Merged

Conversation

james-bebbington
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jul 16, 2020

Codecov Report

Merging #1379 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1379      +/-   ##
==========================================
- Coverage   90.32%   90.32%   -0.01%     
==========================================
  Files         218      218              
  Lines       15292    15311      +19     
==========================================
+ Hits        13812    13829      +17     
- Misses       1071     1072       +1     
- Partials      409      410       +1     
Impacted Files Coverage Δ
...iver/internal/scraper/filesystemscraper/factory.go 77.77% <100.00%> (+6.34%) ⬆️
...al/scraper/filesystemscraper/filesystem_scraper.go 100.00% <100.00%> (ø)
translator/internaldata/resource_to_oc.go 83.72% <0.00%> (-2.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b66a2de...272eb80. Read the comment docs.

@bogdandrutu bogdandrutu merged commit 558df2e into open-telemetry:master Jul 16, 2020
Comment on lines +100 to +106
// filter devices by name
filteredUsages := make([]*deviceUsage, 0, len(usages))
for _, usage := range usages {
if s.includeDevice(usage.deviceName) {
filteredUsages = append(filteredUsages, usage)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

this can be optimized:

filteredUsages := usage
s.includeFS != nil || s.excludeFS != nil {
	filteredUsages := make([]*deviceUsage, 0, len(usages))
	for _, usage := range usages {
		if s.includeDevice(usage.deviceName) {
			filteredUsages = append(filteredUsages, usage)
		}
	}
}

hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
* Update core version during build

During build we need to also update the core version file, otherwise, the internal metrics show "latest" instead of the real version.

* Update Makefile
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
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