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

OT resource detector #939

Merged
merged 33 commits into from
Jul 20, 2020
Merged

OT resource detector #939

merged 33 commits into from
Jul 20, 2020

Conversation

YANYZP
Copy link
Contributor

@YANYZP YANYZP commented Jul 15, 2020

Past PR: #924

@lizthegrey
Copy link
Member

Flakes were due to a CircleCI/GitHub outage; in future you can force a rerun from the Checks tab without needing to re-push.

@lizthegrey
Copy link
Member

Please make your commit history more readable by using git rebase in future.

@MrAlias
Copy link
Contributor

MrAlias commented Jul 15, 2020

@YANYZP I don't see significant changes made between this and #924. Recreating PRs is sometimes necessary when there are significant revisions that will fundamentally alter the approach of a PR, but it also means all previous comments and reviews are not immediately associated with the PR. This means any previous issue not resolved in the original PR needs to be recreated in the new PR.

As there are now new requests associated with this PR it seems we are not able to go back to #924. Please do not recreate a PR in the future without significant change to the content.

Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

This is getting close. Some restructuring and removal of the multierror package are needed though.

sdk/resource/detect/auto.go Outdated Show resolved Hide resolved
sdk/resource/detect/auto.go Outdated Show resolved Hide resolved
sdk/resource/detect/auto.go Outdated Show resolved Hide resolved
sdk/resource/detect/auto.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
@YANYZP
Copy link
Contributor Author

YANYZP commented Jul 16, 2020

  1. Used []string to integrate errors; 2) restructured codes; 3) adopted QueryUnescape function to handle values

sdk/resource/auto.go Outdated Show resolved Hide resolved
sdk/resource/auto.go Show resolved Hide resolved
sdk/resource/auto.go Show resolved Hide resolved
sdk/resource/detect/doc.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
sdk/resource/detect/env.go Outdated Show resolved Hide resolved
@YANYZP
Copy link
Contributor Author

YANYZP commented Jul 16, 2020

Changed code structures and provided more detailed comments

sdk/resource/auto.go Outdated Show resolved Hide resolved
Copy link
Member

@lizthegrey lizthegrey left a comment

Choose a reason for hiding this comment

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

The changes to go.mod/go.sum seem like they may be spurious. Can you revert them, and then run go mod tidy?

sdk/resource/auto.go Outdated Show resolved Hide resolved
sdk/resource/auto.go Outdated Show resolved Hide resolved
sdk/resource/doc.go Outdated Show resolved Hide resolved
sdk/resource/env.go Outdated Show resolved Hide resolved
sdk/resource/env.go Outdated Show resolved Hide resolved
sdk/resource/env_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

Looking good, one follow on from the last review.

@YANYZP have you looked into the question @lizthegrey asked above about resetting the go.sum/go.mod files?

sdk/resource/env.go Outdated Show resolved Hide resolved
@MrAlias
Copy link
Contributor

MrAlias commented Jul 17, 2020

@YANYZP can we also update the CHANGELOG with this addition?

CHANGELOG.md Outdated
@@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Added

- A general Resources Detector Interface and one implementation FromEnv under folder `sdk/resource`. (#939)
Copy link
Member

Choose a reason for hiding this comment

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

Can you please instead describe in less technical language? e.g. "Allows Resources to be detected from environment variables"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will do.

CHANGELOG.md Outdated Show resolved Hide resolved
@MrAlias MrAlias merged commit 99c2998 into open-telemetry:master Jul 20, 2020
This was referenced Jul 20, 2020
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.

4 participants