Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion apps/active_directory_ds.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ func (r MetricsReceiverActiveDirectoryDS) Pipelines(_ context.Context) ([]otel.R
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/activemq.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ func (r MetricsReceiverActivemq) Pipelines(_ context.Context) ([]otel.ReceiverPi
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
3 changes: 2 additions & 1 deletion apps/aerospike.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ func (r MetricsReceiverAerospike) Pipelines(_ context.Context) ([]otel.ReceiverP
otel.TransformationMetrics(
otel.FlattenResourceAttribute("aerospike.node.name", "node_name"),
otel.FlattenResourceAttribute("aerospike.namespace", "namespace_name"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
}},
}}, nil
}
Expand Down
3 changes: 2 additions & 1 deletion apps/apache.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ func (r MetricsReceiverApache) Pipelines(_ context.Context) ([]otel.ReceiverPipe
),
otel.TransformationMetrics(
otel.FlattenResourceAttribute("apache.server.name", "server_name"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ func (r MetricsReceiverCassandra) Pipelines(_ context.Context) ([]otel.ReceiverP
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
9 changes: 7 additions & 2 deletions apps/couchbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,13 @@ func (r MetricsReceiverCouchbase) Pipelines(_ context.Context) ([]otel.ReceiverP
otel.AddPrefix("workload.googleapis.com"),
),
// Using the transform processor for metrics
otel.TransformationMetrics(r.transformMetrics()...),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
append(
r.transformMetrics(),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
)...,
),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/couchdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ func (r MetricsReceiverCouchdb) Pipelines(_ context.Context) ([]otel.ReceiverPip
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
6 changes: 4 additions & 2 deletions apps/dcgm.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ func (r MetricsReceiverDcgm) Pipelines(_ context.Context) ([]otel.ReceiverPipeli
otel.FlattenResourceAttribute("gpu.model", "model"),
otel.FlattenResourceAttribute("gpu.number", "gpu_number"),
otel.FlattenResourceAttribute("gpu.uuid", "uuid"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("2.0"),
),
otel.ModifyInstrumentationScope(r.Type(), "2.0"),
}},
}}, nil
}
Expand Down Expand Up @@ -199,8 +200,9 @@ func (r MetricsReceiverDcgm) Pipelines(_ context.Context) ([]otel.ReceiverPipeli
otel.FlattenResourceAttribute("gpu.model", "model"),
otel.FlattenResourceAttribute("gpu.number", "gpu_number"),
otel.FlattenResourceAttribute("gpu.uuid", "uuid"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ func (r MetricsReceiverElasticsearch) Pipelines(_ context.Context) ([]otel.Recei
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
3 changes: 2 additions & 1 deletion apps/flink.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ func (r MetricsReceiverFlink) Pipelines(_ context.Context) ([]otel.ReceiverPipel
otel.FlattenResourceAttribute("flink.task.name", "task_name"),
otel.FlattenResourceAttribute("flink.subtask.index", "subtask_index"),
otel.FlattenResourceAttribute("flink.resource.type", "resource_type"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/hadoop.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ func (r MetricsReceiverHadoop) Pipelines(_ context.Context) ([]otel.ReceiverPipe
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
5 changes: 4 additions & 1 deletion apps/hbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ func (r MetricsReceiverHbase) Pipelines(_ context.Context) ([]otel.ReceiverPipel
otel.AggregateLabels("max", "state"),
),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
8 changes: 6 additions & 2 deletions apps/iis.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func (r MetricsReceiverIis) Pipelines(_ context.Context) ([]otel.ReceiverPipelin
otel.TransformationMetrics(
otel.FlattenResourceAttribute("iis.site", "site"),
otel.FlattenResourceAttribute("iis.application_pool", "app_pool"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
Comment thread
avilevy18 marked this conversation as resolved.
otel.SetScopeVersion("2.0"),
),
// Drop all resource keys; Must be done in a separate transform,
// otherwise the above flatten resource attribute queries will only
Expand All @@ -68,7 +70,6 @@ func (r MetricsReceiverIis) Pipelines(_ context.Context) ([]otel.ReceiverPipelin
otel.AddPrefix("workload.googleapis.com"),
),
otel.NormalizeSums(),
otel.ModifyInstrumentationScope(r.Type(), "2.0"),
}},
}}, nil
}
Expand Down Expand Up @@ -137,7 +138,10 @@ func (r MetricsReceiverIis) Pipelines(_ context.Context) ([]otel.ReceiverPipelin
"agent.googleapis.com/iis/request_count",
),
otel.NormalizeSums(),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/jetty.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ func (r MetricsReceiverJetty) Pipelines(_ context.Context) ([]otel.ReceiverPipel
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
5 changes: 4 additions & 1 deletion apps/jvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ func (r MetricsReceiverJVM) Pipelines(_ context.Context) ([]otel.ReceiverPipelin
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
5 changes: 4 additions & 1 deletion apps/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ func (r MetricsReceiverKafka) Pipelines(_ context.Context) ([]otel.ReceiverPipel
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
5 changes: 4 additions & 1 deletion apps/memcached.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ func (r MetricsReceiverMemcached) Pipelines(_ context.Context) ([]otel.ReceiverP
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ func (r MetricsReceiverMongoDB) Pipelines(_ context.Context) ([]otel.ReceiverPip
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
8 changes: 6 additions & 2 deletions apps/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ func (m MetricsReceiverMssql) Pipelines(_ context.Context) ([]otel.ReceiverPipel
),
otel.TransformationMetrics(
otel.FlattenResourceAttribute("sqlserver.database.name", "database"),
otel.SetScopeName("agent.googleapis.com/"+m.Type()),
otel.SetScopeVersion("2.0"),
),
otel.NormalizeSums(),
otel.ModifyInstrumentationScope(m.Type(), "2.0"),
}},
}}, nil
}
Expand Down Expand Up @@ -101,7 +102,10 @@ func (m MetricsReceiverMssql) Pipelines(_ context.Context) ([]otel.ReceiverPipel
),
otel.AddPrefix("agent.googleapis.com"),
),
otel.ModifyInstrumentationScope(m.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+m.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ func (r MetricsReceiverMySql) Pipelines(_ context.Context) ([]otel.ReceiverPipel
),
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
},
}, nil
Expand Down
5 changes: 4 additions & 1 deletion apps/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ func (r MetricsReceiverNginx) Pipelines(_ context.Context) ([]otel.ReceiverPipel
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/oracledb.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ func (r MetricsReceiverOracleDB) Pipelines(_ context.Context) ([]otel.ReceiverPi
otel.RenameLabel("WAIT_CLASS", "wait_class"),
),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
3 changes: 2 additions & 1 deletion apps/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ func (r MetricsReceiverPostgresql) Pipelines(_ context.Context) ([]otel.Receiver
// The two metrics are mutually exclusive so we do not need to worry about overwriting or removing the original wal.lag.
otel.ConvertFloatToInt("postgresql.wal.delay"),
otel.SetName("postgresql.wal.delay", "postgresql.wal.lag"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
otel.MetricsTransform(
otel.UpdateMetric("postgresql.bgwriter.duration",
otel.ToggleScalarDataType,
),
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
}},
}}, nil
}
Expand Down
3 changes: 2 additions & 1 deletion apps/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ func (r MetricsReceiverRabbitmq) Pipelines(_ context.Context) ([]otel.ReceiverPi
otel.FlattenResourceAttribute("rabbitmq.queue.name", "queue_name"),
otel.FlattenResourceAttribute("rabbitmq.node.name", "node_name"),
otel.FlattenResourceAttribute("rabbitmq.vhost.name", "vhost_name"),
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ func (r MetricsReceiverRedis) Pipelines(_ context.Context) ([]otel.ReceiverPipel
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
3 changes: 2 additions & 1 deletion apps/saphana.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ func (s MetricsReceiverSapHana) Pipelines(_ context.Context) ([]otel.ReceiverPip
),
otel.TransformationMetrics(
otel.FlattenResourceAttribute("saphana.host", "host"),
otel.SetScopeName("agent.googleapis.com/"+s.Type()),
otel.SetScopeVersion("1.0"),
),
otel.ModifyInstrumentationScope(s.Type(), "1.0"),
}},
}}, nil
}
Expand Down
5 changes: 4 additions & 1 deletion apps/solr.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ func (r MetricsReceiverSolr) Pipelines(_ context.Context) ([]otel.ReceiverPipeli
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
5 changes: 4 additions & 1 deletion apps/tomcat.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ func (r MetricsReceiverTomcat) Pipelines(_ context.Context) ([]otel.ReceiverPipe
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
},
)
}
Expand Down
5 changes: 4 additions & 1 deletion apps/varnish.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ func (r MetricsReceiverVarnish) Pipelines(_ context.Context) ([]otel.ReceiverPip
otel.MetricsTransform(
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.TransformationMetrics(
otel.SetScopeName("agent.googleapis.com/"+r.Type()),
otel.SetScopeVersion("1.0"),
),
}},
}}, nil
}
Expand Down
Loading
Loading