This repository was archived by the owner on Oct 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module contrib.go.opencensus.io/exporter/stackdriver
22
33require (
44 cloud.google.com/go v0.38.0
5- contrib.go.opencensus.io/resource v0.1.0
5+ contrib.go.opencensus.io/resource v0.1.1
66 github.com/aws/aws-sdk-go v1.19.18
77 github.com/census-instrumentation/opencensus-proto v0.2.0
88 github.com/golang/protobuf v1.3.1
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
44cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo =
55cloud.google.com/go v0.38.0 /go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU =
66contrib.go.opencensus.io/resource v0.1.0 /go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA =
7+ contrib.go.opencensus.io/resource v0.1.1 /go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA =
78github.com/BurntSushi/toml v0.3.1 /go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU =
89github.com/aws/aws-sdk-go v1.19.18 h1:Hb3+b9HCqrOrbAtFstUWg7H5TQ+/EcklJtE8VShVs8o =
910github.com/aws/aws-sdk-go v1.19.18 /go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo =
Original file line number Diff line number Diff line change @@ -180,12 +180,12 @@ func TestProtoMetricWithDifferentResource(t *testing.T) {
180180 {
181181 in : & metricspb.Metric {
182182 MetricDescriptor : & metricspb.MetricDescriptor {
183- Name : "with_k8s_resource " ,
183+ Name : "with_container_resource " ,
184184 Description : "This is a test" ,
185185 Unit : "By" ,
186186 },
187187 Resource : & resourcepb.Resource {
188- Type : resourcekeys .K8SType ,
188+ Type : resourcekeys .ContainerType ,
189189 Labels : map [string ]string {
190190 resourcekeys .K8SKeyClusterName : "cluster1" ,
191191 resourcekeys .K8SKeyPodName : "pod1" ,
@@ -217,7 +217,7 @@ func TestProtoMetricWithDifferentResource(t *testing.T) {
217217 TimeSeries : []* monitoringpb.TimeSeries {
218218 {
219219 Metric : & googlemetricpb.Metric {
220- Type : "custom.googleapis.com/opencensus/with_k8s_resource " ,
220+ Type : "custom.googleapis.com/opencensus/with_container_resource " ,
221221 Labels : map [string ]string {},
222222 },
223223 Resource : & monitoredrespb.MonitoredResource {
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ func defaultMapResource(res *resource.Resource) *monitoredrespb.MonitoredResourc
9090 if res == nil || res .Labels == nil {
9191 return result
9292 }
93- if res .Type == resourcekeys .K8SType {
93+ if res .Type == resourcekeys .ContainerType {
9494 result .Type = "k8s_container"
9595 match = k8sResourceMap
9696 } else if v , ok := res .Labels [resourcekeys .CloudKeyProvider ]; ok {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ func TestDefaultMapResource(t *testing.T) {
3333 // first mapping that doesn't apply.
3434 {
3535 input : & resource.Resource {
36- Type : resourcekeys .K8SType ,
36+ Type : resourcekeys .ContainerType ,
3737 Labels : map [string ]string {
3838 stackdriverProjectID : "proj1" ,
3939 resourcekeys .K8SKeyClusterName : "cluster1" ,
You can’t perform that action at this time.
0 commit comments