Adds monitored resource to [core]#173
Adds monitored resource to [core]#173isaikevych wants to merge 3 commits intocensus-instrumentation:masterfrom
Conversation
b8c4ef9 to
9935cb5
Compare
9935cb5 to
f3e812c
Compare
36ef9cc to
eeec932
Compare
|
|
||
| getLabels() { | ||
| const aws = new AwsIdentityDocumentUtils(); | ||
| return aws.getMetadata(); |
There was a problem hiding this comment.
Please only extract the needed information from the AWS metadata (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html). The only things needed are account id, instance id and region.
eeec932 to
ce3d154
Compare
3989d04 to
50e3a25
Compare
| @@ -0,0 +1,74 @@ | |||
| export enum MonitoredResources { | |||
| GCP_GCE_INSTANCE = 'gce_instance', | |||
There was a problem hiding this comment.
The type and attribute names should match Specs. See also go constants
| MonitoredResources.GCP_GCE_INSTANCE|MonitoredResources.AWS_EC2_INSTANCE; | ||
| export type MonitoredResourceMetadata = Record<string, string>|string; | ||
|
|
||
| export interface MonitoredResource { |
There was a problem hiding this comment.
Consider to change MonitoredResource => Resource. MonitoredResourceUtil = > ResourceUtil, MonitoredResourceType = > ResourceType, AwsMonitoredResource => AwsResource.
There was a problem hiding this comment.
This new requirements blocked by Resource API
| @@ -0,0 +1,105 @@ | |||
| /** | |||
There was a problem hiding this comment.
Please change "monitored-resource" => "resource-util" and this shouldn't be part of core package.
There was a problem hiding this comment.
This new requirements blocked by Resource API
|
@mayurkale22 Mayur will continue work on it as we decided on our planing |
I'm confused. Is this PR ready for review / merge, or is @mayurkale22 going to continue with some work and so should hold off on review? |
|
Obsolete, counterpart is already implemented in #312 (under review). |
Monitored resource for #130
Issue #38.