-
Notifications
You must be signed in to change notification settings - Fork 39
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 new module for resource-detector support library #276
Add new module for resource-detector support library #276
Conversation
c9235af
to
f4e1173
Compare
b0a0878
to
563ea05
Compare
2c2c1d6
to
f8b15ae
Compare
7ad60e9
to
eefad12
Compare
...ces-support/src/main/java/com/google/cloud/opentelemetry/detectors/EnvironmentVariables.java
Outdated
Show resolved
Hide resolved
eefad12
to
3a48e94
Compare
3a48e94
to
27184e3
Compare
...ources-support/src/main/java/com/google/cloud/opentelemetry/detectors/CloudLocationUtil.java
Outdated
Show resolved
Hide resolved
...rces-support/src/main/java/com/google/cloud/opentelemetry/detectors/GCPPlatformDetector.java
Outdated
Show resolved
Hide resolved
|
||
// Order of detection functions matters here | ||
Stream<Function<EnvironmentVariables, Optional<SupportedPlatform>>> platforms = | ||
Stream.of(detectGKE, detectGCR, detectGCF, detectGAE); |
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.
Shouldn't GCF be before GCR?
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.
I did not look at the spec again, but I was going by the code we already had - in which we checked for GCR before GCF.
Is there a reason why GCF should be checked before GCR ?
...esources-support/src/main/java/com/google/cloud/opentelemetry/detectors/GoogleAppEngine.java
Outdated
Show resolved
Hide resolved
d9c39eb
to
d3df7d6
Compare
d3df7d6
to
5c9500f
Compare
de8d26a
to
8ab8080
Compare
7e8e92d
to
601b4f0
Compare
.../resources-support/src/main/java/com/google/cloud/opentelemetry/detectors/AttributeKeys.java
Outdated
Show resolved
Hide resolved
...sources-support/src/main/java/com/google/cloud/opentelemetry/detectors/DetectedPlatform.java
Outdated
Show resolved
Hide resolved
0c3035c
to
4d577f0
Compare
Support library was using the same package as the detectors library. This rename would avoid potential conflicts and import issues.
7b53df5
to
3ced0b9
Compare
These breaking chnages can be directly introduced when we contribute the resource detector upstream. This commit adds classes back and marks them deprecated to indicate to the users not to depend on them.
3ced0b9
to
dccc767
Compare
Separates out resource detection module into a support-library (detector-resources-support) and a mapper (detector-resources).
The mapper uses the support-library to map OTel specific resources to GCP specific resources. The support-library contains logic to detect the GCP specific resources and provided appropriate attributes for the detected resource.
The logic split has been done keeping the following in mind -
Supports #266