Skip to content

Commit

Permalink
exporter: add namespace to internal metric label (#684)
Browse files Browse the repository at this point in the history
* exporter: add namespace to internal metric label

* fix linting error

Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>

---------

Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>
  • Loading branch information
ridwanmsharif committed Jul 24, 2023
1 parent c3147fc commit 54bb068
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
Expand Up @@ -25,7 +25,7 @@ import (
const (
// Special attribute key used by Ops Agent prometheus receiver to denote untyped
// prometheus metric. Internal use only.
GCPOpsAgentUntypedMetricKey = "prometheus_untyped_metric"
GCPOpsAgentUntypedMetricKey = "prometheus.googleapis.com/internal/untyped_metric"

gcpUntypedDoubleExportGateKey = "gcp.untyped_double_export"
)
Expand Down
@@ -1,61 +1,61 @@
{
"resourceMetrics":[
{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "cloud.availability_zone",
"value": {
"stringValue": "us-central1-c"
"attributes": [
{
"key": "cloud.availability_zone",
"value": {
"stringValue": "us-central1-c"
}
},
{
"key": "service.name",
"value": {
"stringValue": "demo"
}
},
{
"key": "service.instance.id",
"value": {
"stringValue": "10.92.5.2:15692"
}
}
},
{
"key": "service.name",
"value": {
"stringValue": "demo"
}
},
{
"key": "service.instance.id",
"value": {
"stringValue": "10.92.5.2:15692"
}
}
]
]
},
"scopeMetrics":[
{
"scope":{},
"metrics":[
{
"name":"fake_untyped_metric",
"gauge":{
"dataPoints":[
"scopeMetrics": [
{
"scope": {},
"metrics": [
{
"name": "fake_untyped_metric",
"gauge": {
"dataPoints": [
{
"attributes":[
"attributes": [
{
"key":"ex_com_lemons_untyped",
"value":{
"stringValue":"13"
"key": "ex_com_lemons_untyped",
"value": {
"stringValue": "13"
}
},
{
"key":"prometheus_untyped_metric",
"value":{
"stringValue":"true"
"key": "prometheus.googleapis.com/internal/untyped_metric",
"value": {
"stringValue": "true"
}
}
],
"startTimeUnixNano":"1649443416286000000",
"timeUnixNano":"1649443516286000000",
"asDouble":3
"startTimeUnixNano": "1649443416286000000",
"timeUnixNano": "1649443516286000000",
"asDouble": 3
}
]
}
}
]
}
]
}
]
}
}
]
}
]
}
]
}
Expand Up @@ -8,7 +8,7 @@
"type": "workload.googleapis.com/fake_untyped_metric",
"labels": {
"ex_com_lemons_untyped": "13",
"prometheus_untyped_metric": "true"
"prometheus_googleapis_com_internal_untyped_metric": "true"
}
},
"resource": {
Expand Down Expand Up @@ -47,7 +47,7 @@
"key": "ex_com_lemons_untyped"
},
{
"key": "prometheus_untyped_metric"
"key": "prometheus_googleapis_com_internal_untyped_metric"
}
],
"metricKind": "GAUGE",
Expand Down

0 comments on commit 54bb068

Please sign in to comment.