This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Add resource translation readme file. #163
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# RESOURCES | ||
|
||
Stackdriver has defined [resource types](https://cloud.google.com/monitoring/api/resources) for monitoring and for each resource type there | ||
are mandatory resource labels. OpenCensus has defined [standard resource](https://github.com/census-instrumentation/opencensus-specs/blob/master/resource/StandardResources.md) | ||
types and labels. | ||
This document describes the translation from OpenCensus resources to Stackdriver resources | ||
performed by this exporter. | ||
|
||
## Mapping between Stackdriver and OpenCensus Resources | ||
|
||
### k8s_container | ||
|
||
**condition:** resource.type == container | ||
|
||
*k8s_container takes a precedence, so GKE will be mapped to k8s_container and its | ||
associated resource labels but it will not contain any gcp_instance specific | ||
resource labels.* | ||
|
||
|
||
| Item | OpenCensus | Stackdriver | | ||
|---------------------|--------------------|----------------| | ||
| **resource type** | container | k8s_container | | ||
| **resource labels** | | | | ||
| | cloud.zone | location | | ||
| | k8s.cluster.name | cluster_name | | ||
| | k8s.namespace.name | namespace_name | | ||
| | k8s.pod.name | pod_name | | ||
| | container.name | container_name | | ||
|
||
|
||
### gcp_instance | ||
**condition:** cloud.provider == gcp | ||
|
||
| Item | OpenCensus | Stackdriver | | ||
|---------------------|--------------------|----------------| | ||
| **resource type** | cloud | gcp_instance | | ||
| **resource labels** | | | | ||
| | host.id | instance_id | | ||
| | cloud.zone | zone | | ||
|
||
|
||
### aws_ec2_instance | ||
**condition:** cloud.provider == aws | ||
|
||
| Item | OpenCensus | Stackdriver | | ||
|---------------------|--------------------|------------------| | ||
| **resource type** | | | | ||
| | cloud | aws_ec2_instance | | ||
| **resource labels** | | | | ||
| | host.id | instance_id | | ||
| | cloud.region | region | | ||
| | cloud.account.id | aws_account | | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You can also mention
k8s_container
takes precedence, i.e GKE will be mapped tok8s_container
and won't have GCP specific labels.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.