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 AWS resource detectors to extension package #586

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
50a280c
Add raw implementation of all aws detector UNTESTED
NathanielRN Jul 10, 2021
14f450a
Update semantic conventions variables
NathanielRN Jul 12, 2021
0abe18b
Requests and attribute fixes
NathanielRN Jul 13, 2021
7b8cf1b
Move path of detectors to shorter path
NathanielRN Jul 13, 2021
2f919b3
Fix lambda directory name
NathanielRN Jul 13, 2021
36dd476
Verified lambda and beanstalk detectors
NathanielRN Jul 14, 2021
7bee607
Some fixes to ecs and eks detectors
NathanielRN Jul 14, 2021
2b04578
Small updates to EKS resource detector
NathanielRN Jul 14, 2021
a72190a
Add unit tests for all resource detectors
NathanielRN Jul 15, 2021
f11c96f
Add readme and documentation updates
NathanielRN Jul 15, 2021
cf539d2
Adds useful links to explain resource detection
NathanielRN Jul 15, 2021
6a1caaa
Update changelog
NathanielRN Jul 15, 2021
7a73524
Fix linter issues
NathanielRN Jul 15, 2021
0583ed4
Use correct black version to lint
NathanielRN Jul 15, 2021
e7f39ae
Use correct isort version to lint test files
NathanielRN Jul 15, 2021
49790cf
Address flake lint problems
NathanielRN Jul 15, 2021
5533fa1
Better naming for file stream objects for lint
NathanielRN Jul 15, 2021
5e2e67a
Remove my embrassing debug statements
NathanielRN Jul 15, 2021
d9762e6
Use raise_on_error to make Resource detect required
NathanielRN Jul 15, 2021
549b9e2
Make all debug log statements warnings instead
NathanielRN Jul 15, 2021
25a904a
Run linter on recent changes
NathanielRN Jul 15, 2021
3ada952
Address several lint issues with Exception too broad
NathanielRN Jul 20, 2021
4756278
Update test to match previous lint updates
NathanielRN Jul 20, 2021
aeb838f
Raise eks excep if k8 token fetch failed
NathanielRN Jul 20, 2021
9bd36f8
README subheading needs to be longer
NathanielRN Jul 20, 2021
cf0efc4
Small updates to address PR comments
NathanielRN Jul 21, 2021
e63224e
Add root prefix to ecs container file read
NathanielRN Jul 23, 2021
24e8326
Linter limits lines on exception message
NathanielRN Jul 23, 2021
2e8d7fe
Add root prefix to eks container file read
NathanielRN Jul 23, 2021
87863eb
Eks fixes and add helpful docstring link
NathanielRN Jul 23, 2021
d6ad808
FileNotFoundError and allow either empty container id or cluster name…
NathanielRN Jul 23, 2021
480c112
Less redundancy with general exceptions
NathanielRN Jul 23, 2021
58445b8
Update test to reflect eks with only 1 open
NathanielRN Jul 23, 2021
9cd22df
Python strings need to have backslash escaped
NathanielRN Jul 23, 2021
530a91b
lazy loading for log messages
NathanielRN Jul 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move path of detectors to shorter path
  • Loading branch information
NathanielRN committed Jul 23, 2021
commit 7b8cf1b1c189785ab11d7065a9f20b7ad511bd85
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright The OpenTelemetry Authors
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: opentelemetry.sdk.extension.aws.resources plural to match opentelemetry.sdk.resources? Not a big deal though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I didn't even notice that, actually I did resource because that is the folder it is in on the specifications

Also in java we put it under resource

And yet JavaScript, Go and PHP all put it under a folder called detectors/ 😅

I guess I'll defer to the SIG here, as GCP and other vendors will probably add their resource Detectors soon... maybe we should even move the SDK import path? 😓 Although I imagine that will be hard after 1.0.

Copy link
Contributor

Choose a reason for hiding this comment

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

We aren't at 1.0 yet so nows the time to decide on an import path :D. But again, not a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I meant we should move opentelemetry.sdk.resources to opentelemetry.sdk.resource to match the spec 🙂

I actually like .resource because there is only 1 resource: namespace in the attributes. Even if you add multiple ResourceDetectors you're still setting attributes in 1 namespace...

I'll leave it for now and if we need to we'll change it before this package goes 1.0 😄. Shouldn't be a big deal to do "both" if we need to as well later!

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from opentelemetry.sdk.extension.aws.resource.beanstalk import AwsBeanstalkResourceDetector
from opentelemetry.sdk.extension.aws.resource.ec2 import AwsEc2ResourceDetector
from opentelemetry.sdk.extension.aws.resource.ecs import AwsEcsResourceDetector
from opentelemetry.sdk.extension.aws.resource.eks import AwsEksResourceDetector
from opentelemetry.sdk.extension.aws.resource.lambda import AwsLambdaResourceDetector

__all__ = [
NathanielRN marked this conversation as resolved.
Show resolved Hide resolved
AwsBeanstalkResourceDetector,
AwsEc2ResourceDetector,
AwsEc2ResourceDetector,
AwsEksResourceDetector,
AwsLambdaResourceDetector,
]