-
Notifications
You must be signed in to change notification settings - Fork 96
Adds monitored resource to [core] #173
Adds monitored resource to [core] #173
Conversation
b8c4ef9
to
9935cb5
Compare
9935cb5
to
f3e812c
Compare
packages/opencensus-core/src/common/monitored-resource/gcp-metadata-config.ts
Outdated
Show resolved
Hide resolved
packages/opencensus-core/src/common/monitored-resource/gcp-metadata-config.ts
Outdated
Show resolved
Hide resolved
36ef9cc
to
eeec932
Compare
|
||
getLabels() { | ||
const aws = new AwsIdentityDocumentUtils(); | ||
return aws.getMetadata(); |
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.
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.
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.
Done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider to change MonitoredResource => Resource. MonitoredResourceUtil = > ResourceUtil, MonitoredResourceType = > ResourceType, AwsMonitoredResource => AwsResource.
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.
This new requirements blocked by Resource API
@@ -0,0 +1,105 @@ | |||
/** |
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.
Please change "monitored-resource" => "resource-util" and this shouldn't be part of core package.
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.
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.