Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The servergraph component merges metrics from different dimensions #35287

Open
hongweipeng opened this issue Sep 19, 2024 · 1 comment
Open
Labels
bug Something isn't working connector/servicegraph needs triage New item requiring triage

Comments

@hongweipeng
Copy link

Component(s)

connector/servicegraph

What happened?

Description

In the buildMetricKey function:

func (p *serviceGraphConnector) buildMetricKey(clientName, serverName, connectionType, failed string, edgeDimensions map[string]string) string {
	var metricKey strings.Builder
	metricKey.WriteString(clientName + metricKeySeparator + serverName + metricKeySeparator + connectionType + metricKeySeparator + failed)

	for _, dimName := range p.config.Dimensions {
		dim, ok := edgeDimensions[dimName]
		if !ok {
			continue
		}
		metricKey.WriteString(metricKeySeparator + dim)
	}

	return metricKey.String()
}

The edgeDimensions dimensions all have the client_ or server_ prefix; the dimensions in the function do not take the prefix into consideration. Make this for loop ineffective, Indicators from different dimensions have been merged.

Collector version

v0.108.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@hongweipeng hongweipeng added bug Something isn't working needs triage New item requiring triage labels Sep 19, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working connector/servicegraph needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

1 participant