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

Remove resource.WithBuiltinDetectors which has not been maintained #2097

Conversation

hanyuancheung
Copy link
Member

Resolved: #2026
Remove resource.WithBuiltinDetectors() as well as the test function.

CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #2097 (91c406b) into main (d57c5a5) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2097   +/-   ##
=====================================
  Coverage   73.1%   73.1%           
=====================================
  Files        165     165           
  Lines       8158    8155    -3     
=====================================
- Hits        5966    5965    -1     
+ Misses      1963    1961    -2     
  Partials     229     229           
Impacted Files Coverage Δ
sdk/resource/builtin.go 90.9% <ø> (ø)
sdk/resource/os.go 93.3% <ø> (-1.2%) ⬇️
sdk/resource/process.go 100.0% <ø> (ø)
sdk/resource/resource.go 75.0% <ø> (ø)
sdk/resource/config.go 100.0% <100.0%> (ø)
exporters/jaeger/jaeger.go 94.2% <0.0%> (+1.1%) ⬆️

@hanyuancheung
Copy link
Member Author

Some link check has failed, because of the new experimental metrics v0.22.0. But this generally looks good, could anybody answer or help with this?

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -40,6 +40,7 @@ type (
// disable them.
host struct{}

// stringDetector is a Detector that provides information about the
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 an incomplete sentence. Maybe something got cutoff?

@@ -78,7 +79,8 @@ func StringDetector(schemaURL string, k attribute.Key, f func() (string, error))
return stringDetector{schemaURL: schemaURL, K: k, F: f}
}

// Detect implements Detector.
// Detect returns a *Resource that describes the string as a value
// corresponding to k as well as the specific schemaURL.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does k refer to here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It stands for attribute.Key .

Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the comment here to make it clear.

sdk/resource/config.go Show resolved Hide resolved
sdk/resource/resource_test.go Show resolved Hide resolved
@MrAlias
Copy link
Contributor

MrAlias commented Jul 20, 2021

Some link check has failed, because of the new experimental metrics v0.22.0. But this generally looks good, could anybody answer or help with this?

#2106 should resolve the markdown link issue. Updating the branch will pull in the fix.

@hanyuancheung hanyuancheung force-pushed the feature/remove_resource_WithBuiltinDetectors_func branch from 0f4c61c to 0eaa33c Compare July 21, 2021 04:53
Comment on lines 110 to 118
t.Run("WithPID", TestWithProcessPID)
t.Run("WithExecutableName", TestWithProcessExecutableName)
t.Run("WithExecutablePath", TestWithProcessExecutablePath)
t.Run("WithCommandArgs", TestWithProcessCommandArgs)
t.Run("WithOwner", TestWithProcessOwner)
t.Run("WithRuntimeName", TestWithProcessRuntimeName)
t.Run("WithRuntimeVersion", TestWithProcessRuntimeVersion)
t.Run("WithRuntimeDescription", TestWithProcessRuntimeDescription)
t.Run("WithProcess", TestWithProcess)
Copy link
Contributor

Choose a reason for hiding this comment

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

This runs these tests twice in the CI system, right? Can we remove this and keep the exported functions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Already done as mentioned above, please review it again. Thanks

@hanyuancheung
Copy link
Member Author

hanyuancheung commented Jul 21, 2021

If everything looks good, please help to approve and merge it. @MrAlias thanks a lot ~

@MrAlias MrAlias merged commit 25d739b into open-telemetry:main Jul 22, 2021
@hanyuancheung hanyuancheung changed the title Remove resource.WithBuiltinDetectors() which has not been maintained Remove resource.WithBuiltinDetectors which has not been maintained Jul 23, 2021
@hanyuancheung
Copy link
Member Author

Hi, it's a great honor for me to apply for being a member of OpenTelemetry community, after finished reading the membership guidelines doc

Here is the list of my contributions to the OpenTelemetry project:

Could anybody please be my sponsor supporting me to do that?
@MrAlias @jmacd @paivagustavo @Aneurysm9 @MadVikingGod
Deeply appreciate~

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.

Update or remove resource.WithBuiltinDetectors()
5 participants