From a977ee5f6d4cf53afd7bc604919f1ceff2324128 Mon Sep 17 00:00:00 2001 From: Olivier Giniaux Date: Wed, 13 Mar 2024 21:15:44 +0100 Subject: [PATCH] [connector/servicegraph] Update virtual node defaults and change feature gate to beta --- connector/servicegraphconnector/README.md | 6 +++--- connector/servicegraphconnector/connector.go | 2 +- connector/servicegraphconnector/factory.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/connector/servicegraphconnector/README.md b/connector/servicegraphconnector/README.md index 00f0a96ad2df..11ebc8743c78 100644 --- a/connector/servicegraphconnector/README.md +++ b/connector/servicegraphconnector/README.md @@ -120,7 +120,7 @@ datasources: The following settings are required: -- `metrics_exporter`: the name of the exporter that this processor will write metrics to. This exporter **must** be present in a pipeline. +- `metrics_exporter`: the name of the exporter that this connector will write metrics to. This exporter **must** be present in a pipeline. - `latency_histogram_buckets`: the list of durations defining the latency histogram buckets. - Default: `[2ms, 4ms, 6ms, 8ms, 10ms, 50ms, 100ms, 200ms, 400ms, 800ms, 1s, 1400ms, 2s, 5s, 10s, 15s]` - `dimensions`: the list of dimensions to add together with the default dimensions defined above. @@ -136,8 +136,8 @@ The following settings can be optionally configured: - Default: `1m` - `store_expiration_loop`: the time to expire old entries from the store periodically. - Default: `2s` -- `virtual_node_peer_attributes`: the list of attributes need to match for building virtual server node, the higher the front, the higher the priority. - - Default: `[db.name, net.sock.peer.addr, net.peer.name, rpc.service, net.sock.peer.name, net.peer.name, http.url, http.target]` +- `virtual_node_peer_attributes`: the list of attributes, ordered by priority, whose presence in a client span will result in the creation of a virtual server node. + - Default: `[peer.service, db.name, db.system]` - `metrics_flush_interval`: the interval at which metrics are flushed to the exporter. - Default: Metrics are flushed on every received batch of traces. - `database_name_attribute`: the attribute name used to identify the database name from span attributes. diff --git a/connector/servicegraphconnector/connector.go b/connector/servicegraphconnector/connector.go index a8b2818eb565..68098749b8db 100644 --- a/connector/servicegraphconnector/connector.go +++ b/connector/servicegraphconnector/connector.go @@ -42,7 +42,7 @@ var ( } defaultPeerAttributes = []string{ - semconv.AttributeDBName, semconv.AttributeNetSockPeerAddr, semconv.AttributeNetPeerName, semconv.AttributeRPCService, semconv.AttributeNetSockPeerName, semconv.AttributeNetPeerName, semconv.AttributeHTTPURL, semconv.AttributeHTTPTarget, + semconv.AttributePeerService, semconv.AttributeDBName, semconv.AttributeDBSystem, } defaultDatabaseNameAttribute = semconv.AttributeDBName diff --git a/connector/servicegraphconnector/factory.go b/connector/servicegraphconnector/factory.go index daec2316c71c..9b5df000c2f4 100644 --- a/connector/servicegraphconnector/factory.go +++ b/connector/servicegraphconnector/factory.go @@ -30,7 +30,7 @@ var virtualNodeFeatureGate, legacyMetricNamesFeatureGate, legacyLatencyUnitMsFea func init() { virtualNodeFeatureGate = featuregate.GlobalRegistry().MustRegister( virtualNodeFeatureGateID, - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("When enabled, when the edge expires, processor checks if it has peer attributes(`db.name, net.sock.peer.addr, net.peer.name, rpc.service, http.url, http.target`), and then aggregate the metrics with virtual node."), featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/17196"), )