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

[exporter/AlibabaCloudLogServiceExporter] Fix issue that promethus occuring error when resource labels contains dot #13393

Merged
merged 5 commits into from
Sep 5, 2022

Conversation

qiansheng91
Copy link
Contributor

Description

As issue #3429 mentioned, PR #3454 missed sanitizing the resource metric labels. The Prometheus still occurring issue when the resource metrics label contains a dot.

How to fix

Just sanitize those labels when appending resource labels.

PR #3454 has already added sanitize logical in the KeyValues.Append Method. Just like this. So the sanitize logically will be active when the resource metric labels call the Append method.

func (kv *KeyValues) Append(key, value string) {
	key = sanitize(key)
	kv.keyValues = append(kv.keyValues, KeyValue{
		key,
		value,
	})
}

@qiansheng91 qiansheng91 requested review from a team and jpkrohling August 17, 2022 10:15
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 17, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: qiansheng91 / name: 千乘(Qian Sheng) (fa6b189)

@TylerHelmuth
Copy link
Member

pinging @shabicheng @kongluoxing as code owners

Copy link
Contributor

@shabicheng shabicheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qiansheng91 qiansheng91 changed the title [exporter/AlibabaCloudLogServiceExporter] Fix issue that promethus occuring error when resource contains labels dot [exporter/AlibabaCloudLogServiceExporter] Fix issue that promethus occuring error when resource labels contains dot Aug 18, 2022
@qiansheng91 qiansheng91 requested review from shabicheng and removed request for jpkrohling August 18, 2022 02:10
@pingxin403
Copy link

How soon will this PR be merged?

@jpkrohling
Copy link
Member

I'll merge this once the CI is green.

@jpkrohling jpkrohling merged commit 96a3c69 into open-telemetry:main Sep 5, 2022
@qiansheng91 qiansheng91 deleted the sanitize-metric branch October 11, 2022 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants