diff --git a/config/config-windows.yaml b/config/config-windows.yaml index f4398066..a12caa61 100644 --- a/config/config-windows.yaml +++ b/config/config-windows.yaml @@ -366,8 +366,19 @@ processors: # change data type from int64 -> double - action: toggle_scalar_data_type + # filter to include only raw agent metrics supported by cloud monitoring + filter/agent_0: + metrics: + include: + match_type: strict + metric_names: + - otelcol_process_uptime + - otelcol_process_memory_rss + - grpc_client_attempt_duration + - googlecloudmonitoring_point_count + # filter to include only agent metrics supported by cloud monitoring - filter/agent: + filter/agent_1: metrics: include: match_type: strict @@ -377,6 +388,14 @@ processors: - grpc_client_attempt_duration_count - googlecloudmonitoring_point_count + # create count metric from histogram metric + transform/agent: + error_mode: ignore + metric_statements: + - context: metric + statements: + - extract_count_metric(true) where name == "grpc_client_attempt_duration" + # convert from windows perf counter formats to cloud monitoring formats metricstransform/iis: transforms: @@ -433,16 +452,14 @@ processors: action: update new_name: agent/api_request_count operations: - # change data type from double -> int64 - - action: toggle_scalar_data_type # TODO: below is proposed new configuration for the metrics transform processor # ignore any non "google.monitoring" RPCs (note there won't be any other RPCs for now) # - action: select_label_values # label: grpc_client_method # value_regexp: ^google\.monitoring - # change label grpc_client_status -> state + # change label grpc_status -> state - action: update_label - label: grpc_client_status + label: grpc_status new_label: state # delete grpc_client_method dimension, retaining only state - action: aggregate_labels @@ -518,7 +535,9 @@ service: receivers: - prometheus/agent processors: - - filter/agent + - filter/agent_0 + - transform/agent + - filter/agent_1 - metricstransform/agent - resourcedetection exporters: diff --git a/go.mod b/go.mod index 0355108e..f14eb846 100644 --- a/go.mod +++ b/go.mod @@ -417,6 +417,16 @@ require ( // Currently causes build issues on windows. Downgrading to previous version. replace github.com/mattn/go-ieproxy v0.0.9 => github.com/mattn/go-ieproxy v0.0.1 -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.111.0 => github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.111.1-0.20241008202135-c7bcf9d616b9 +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.111.0 => github.com/observiq/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.0.0-20241009202055-299290583f83 -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.111.0 => github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.111.1-0.20241008202135-c7bcf9d616b9 +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.111.0 => github.com/observiq/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.0.0-20241009202055-299290583f83 + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.48.2 => github.com/dashpole/opentelemetry-operations-go/exporter/collector v0.28.1-0.20241009184733-cc36437a262a + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.48.2 => github.com/dashpole/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.0.0-20241009184733-cc36437a262a + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2 => github.com/dashpole/opentelemetry-operations-go/detectors/gcp v0.0.0-20241009184733-cc36437a262a + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.24.2 => github.com/dashpole/opentelemetry-operations-go/exporter/trace v1.4.1-0.20241009184733-cc36437a262a + +replace github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.2 => github.com/dashpole/opentelemetry-operations-go/internal/resourcemapping v0.0.0-20241009184733-cc36437a262a diff --git a/go.sum b/go.sum index 75fed2fa..7443aa7a 100644 --- a/go.sum +++ b/go.sum @@ -93,18 +93,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2 h1:cZpsGsWTIFKymTA0je7IIvi1O7Es7apb9CF3EQlOcfE= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.2/go.mod h1:itPGVDKf9cC/ov4MdvJ2QZ0khw4bfoo9jzwTJlaxy2k= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.48.2 h1:YkwqygP/gm2iuuxAFh8HnFL+ZQ/PKhYRDi3IlfLrBek= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.48.2/go.mod h1:f4MEEOvRbw06aLAQ3g/elRal5XvUaGPUI+uYUL6W4WI= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.48.2 h1:8UhoMZCIt8KI2Ffl5bOTUFXxECM9MSIspfBQkkOQJzM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.48.2/go.mod h1:LRzU5QbgRr3XPKhxtTi3JmZMErXrg53O9LGK6A85IHA= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.24.2 h1:B7ox5J7nwey9FPxobwU1wugDKgVqtFvwZRDS0YbM+tY= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.24.2/go.mod h1:VWMJ2cFLtnygvsntQ8JUNQ/VxoZiVd8ewsmyeKSK3k8= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.2 h1:ffI2ensdT33alWXmBDi/7cvCV7K3o7TF5oE44g8tiN0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.48.2/go.mod h1:pNP/L2wDlaQnQlFvkDKGSruDoYRpmAxB6drgsskfYwg= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.2 h1:th/AQTVtV5u0WVQln/ks+jxhkZ433MeOevmka55fkeg= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.2/go.mod h1:wRbFgBQUVm1YXrvWKofAEmq9HNJTDphbAaJSSX01KUI= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= @@ -237,6 +227,16 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/dashpole/opentelemetry-operations-go/detectors/gcp v0.0.0-20241009184733-cc36437a262a h1:p66XAiU0GLjyra2IwJyVKvq6UD+28iCZxiIMJghD4fE= +github.com/dashpole/opentelemetry-operations-go/detectors/gcp v0.0.0-20241009184733-cc36437a262a/go.mod h1:itPGVDKf9cC/ov4MdvJ2QZ0khw4bfoo9jzwTJlaxy2k= +github.com/dashpole/opentelemetry-operations-go/exporter/collector v0.28.1-0.20241009184733-cc36437a262a h1:OmZMe48TpG5pR8KcsMPkTV6XxUpGxKWxYUHPws0K+Kk= +github.com/dashpole/opentelemetry-operations-go/exporter/collector v0.28.1-0.20241009184733-cc36437a262a/go.mod h1:f4MEEOvRbw06aLAQ3g/elRal5XvUaGPUI+uYUL6W4WI= +github.com/dashpole/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.0.0-20241009184733-cc36437a262a h1:lAkHnjR7n3cgkeB8Nsw35jwTDmW5N1ZLL4TTBsJRJ8c= +github.com/dashpole/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.0.0-20241009184733-cc36437a262a/go.mod h1:LRzU5QbgRr3XPKhxtTi3JmZMErXrg53O9LGK6A85IHA= +github.com/dashpole/opentelemetry-operations-go/exporter/trace v1.4.1-0.20241009184733-cc36437a262a h1:n/3bt9xRStreaKyWuTL5gUhSZInlgCJ6GsmDVaYIoI4= +github.com/dashpole/opentelemetry-operations-go/exporter/trace v1.4.1-0.20241009184733-cc36437a262a/go.mod h1:VWMJ2cFLtnygvsntQ8JUNQ/VxoZiVd8ewsmyeKSK3k8= +github.com/dashpole/opentelemetry-operations-go/internal/resourcemapping v0.0.0-20241009184733-cc36437a262a h1:eGVie1LxVyIxFJ4fQncZxcAZu9AntWqUBTHtKgVtQgs= +github.com/dashpole/opentelemetry-operations-go/internal/resourcemapping v0.0.0-20241009184733-cc36437a262a/go.mod h1:wRbFgBQUVm1YXrvWKofAEmq9HNJTDphbAaJSSX01KUI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -692,6 +692,10 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/nginxinc/nginx-prometheus-exporter v0.11.0 h1:21xjnqNgxtni2jDgAQ90bl15uDnrTreO9sIlu1YsX/U= github.com/nginxinc/nginx-prometheus-exporter v0.11.0/go.mod h1:GdyHnWAb8q8OW1Pssrrqbcqra0SH0Vn6UXICMmyWkw8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/observiq/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.0.0-20241009202055-299290583f83 h1:NrEMRiLLNp4dXZnhhZUtVaUGfSyqzvwD84PX/CADpbY= +github.com/observiq/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.0.0-20241009202055-299290583f83/go.mod h1:z64MorDyOi79xKhlVar4YZ/C2Muig2YuTNiSgsyLo8Q= +github.com/observiq/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.0.0-20241009202055-299290583f83 h1:toK8wyqKbSxNZ7iUGvnnDnwLwIk4NrCEFioC1I0uvEQ= +github.com/observiq/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.0.0-20241009202055-299290583f83/go.mod h1:kJUVJorw/vLAIxnGzRywdq7wbG1EDkSVdRupzaMuYMU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -706,10 +710,6 @@ github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.111.0 h1:0u/131/ZxkKM1maVu6u/FLy/zvtuSbKm+p3sWxcynGE= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.111.0/go.mod h1:uu9yUMMXELC2TNc6j1FJ4gleN5JHMM3LRbVksQjIFtI= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.111.1-0.20241008202135-c7bcf9d616b9 h1:+DfdhSTk7PQM73I9RJh3EghE36aFNzeExmZgCK2JubE= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.111.1-0.20241008202135-c7bcf9d616b9/go.mod h1:/dGnuTvHhZMMAU2yEjcCa513nxTMh1ljX3KIEyyUlfs= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.111.1-0.20241008202135-c7bcf9d616b9 h1:gt9ge0KnUbTbml2811+APED1U/XrhSD1B4KYk/U3MLU= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.111.1-0.20241008202135-c7bcf9d616b9/go.mod h1:1EZloLhDn+fjVLGT1UFOCf6m3Lx1URpxSBW95Hj5xsg= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.111.0 h1:p8vV11sj1cJFbd3B9tuGiA9gMGTvaSR4A57qQvVs9iY= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.111.0/go.mod h1:sBcqg1DlNC6V8e455vASnIrr8LJX7stQ8V3wlbCsIhM= github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.111.0 h1:+iFYp+AtdJFXapPZk1Q+XuJMnncQ7KmWs0p+ZMz9fKg=