Skip to content

Commit

Permalink
Upgrade to new googlecloudexporter (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferbrecht authored Apr 21, 2022
1 parent 417f4a1 commit 25abc2c
Show file tree
Hide file tree
Showing 130 changed files with 721 additions and 341 deletions.
24 changes: 12 additions & 12 deletions apps/iis.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ func (r MetricsReceiverIis) Pipelines() []otel.Pipeline {
{
"object": "Web Service",
"instances": []string{"_Total"},
"counters": []string{
"Current Connections",
"Total Bytes Received",
"Total Bytes Sent",
"Total Connection Attempts (all instances)",
"Total Delete Requests",
"Total Get Requests",
"Total Head Requests",
"Total Options Requests",
"Total Post Requests",
"Total Put Requests",
"Total Trace Requests",
"counters": []map[string]string{
{"name": "Current Connections"},
{"name": "Total Bytes Received"},
{"name": "Total Bytes Sent"},
{"name": "Total Connection Attempts (all instances)"},
{"name": "Total Delete Requests"},
{"name": "Total Get Requests"},
{"name": "Total Head Requests"},
{"name": "Total Options Requests"},
{"name": "Total Post Requests"},
{"name": "Total Put Requests"},
{"name": "Total Trace Requests"},
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions apps/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ func (m MetricsReceiverMssql) Pipelines() []otel.Pipeline {
{
"object": "SQLServer:General Statistics",
"instances": []string{"_Total"},
"counters": []string{"User Connections"},
"counters": []map[string]string{{"name": "User Connections"}},
},
{
"object": "SQLServer:Databases",
"instances": []string{"_Total"},
"counters": []string{
"Transactions/sec",
"Write Transactions/sec",
"counters": []map[string]string{
{"name": "Transactions/sec"},
{"name": "Write Transactions/sec"},
},
},
},
Expand Down
1 change: 1 addition & 0 deletions cmd/ops_agent_windows/main_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func initServices() error {
filepath.Join(base, "google-cloud-metrics-agent_windows_amd64.exe"),
[]string{
"--config=" + filepath.Join(configOutDir, `otel\otel.yaml`),
"--feature-gates=exporter.googlecloud.OTLPDirect",
},
},
{
Expand Down
9 changes: 8 additions & 1 deletion confgenerator/confgenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,16 @@ func (uc *UnifiedConfig) GenerateOtelConfig(hostInfo *host.InfoStat) (string, er
"user_agent": userAgent,
"metric": map[string]interface{}{
// Receivers are responsible for sending fully-qualified metric names.
// NB: If a receiver fails to send a full URL, OT will add the prefix `custom.googleapis.com/opencensus/`.
// NB: If a receiver fails to send a full URL, OT will add the prefix `workload.googleapis.com/{metric_name}`.
// TODO(b/197129428): Write a test to make sure this doesn't happen.
"prefix": "",
// OT calls CreateMetricDescriptor by default. Skip because we want
// descriptors to be created implicitly with new time series.
"skip_create_descriptor": true,
// Omit instrumentation labels, which break agent metrics.
"instrumentation_library_labels": false,
// Omit service labels, which break agent metrics.
"service_resource_labels": false,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
exporters:
googlecloud:
metric:
instrumentation_library_labels: false
prefix: ""
service_resource_labels: false
skip_create_descriptor: true
user_agent: Google-Cloud-Ops-Agent-Metrics/latest (BuildDistro=build_distro;Platform=linux;ShortName=linux_platform;ShortVersion=linux_platform_version)
processors:
agentmetrics/default__pipeline_hostmetrics_0:
Expand Down
Loading

0 comments on commit 25abc2c

Please sign in to comment.