Skip to content

stats(prometheus): escape problematic chars in text serialization - #18978

Merged
ggreenway merged 3 commits into
envoyproxy:mainfrom
douglas-reid:fix-prom-serialization
Nov 18, 2021
Merged

ggreenway merged 3 commits into
envoyproxy:mainfrom
douglas-reid:fix-prom-serialization

Conversation

@douglas-reid

Copy link
Copy Markdown
Contributor

Commit Message: stats(prometheus): escape problematic chars in text serialization
Additional Description:

This PR attempts to address #18589 and istio/istio#35575 by adding escaping logic to the prometheus stats code. An attempt was made to mirror the logic in the prometheus common golang code for text serialization.

Risk Level: Low
Testing: Unit
Fixes #18589

Signed-off-by: Douglas Reid [email protected]

@douglas-reid

Copy link
Copy Markdown
Contributor Author

/test envoy-presubmit

@rojkov

rojkov commented Nov 15, 2021

Copy link
Copy Markdown
Member

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #18978 (comment) was created by @rojkov.

see: more, trace.

@rojkov

rojkov commented Nov 15, 2021

Copy link
Copy Markdown
Member

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #18978 (comment) was created by @rojkov.

see: more, trace.

@douglas-reid

Copy link
Copy Markdown
Contributor Author

Appears to be unrelated failures with quic.

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #18978 (comment) was created by @douglas-reid.

see: more, trace.

@douglas-reid

Copy link
Copy Markdown
Contributor Author

Running locally shows no issues:

Target //test/integration:quic_http_integration_test up-to-date:
  bazel-bin/test/integration/quic_http_integration_test
INFO: Elapsed time: 18.807s, Critical Path: 16.13s
INFO: 7 processes: 1 internal, 6 processwrapper-sandbox.
INFO: Build completed successfully, 7 total actions
//test/integration:quic_http_integration_test                            PASSED in 16.0s
  Stats over 6 runs: max = 16.0s, min = 6.8s, avg = 12.8s, dev = 4.2s

Executed 1 out of 1 test: 1 test passes.
INFO: Build completed successfully, 7 total actions

@mathetake mathetake left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, I left one small bit👍

Comment thread source/server/admin/prometheus_stats.cc Resolved
Comment thread source/server/admin/prometheus_stats.cc Resolved
Signed-off-by: Douglas Reid <[email protected]>
@douglas-reid

Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #18978 (comment) was created by @douglas-reid.

see: more, trace.

mathetake
mathetake previously approved these changes Nov 17, 2021

@mathetake mathetake left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good for first pass

@mathetake

Copy link
Copy Markdown
Member

/assign @envoyproxy/senior-maintainers for the second pass

@repokitteh-read-only

Copy link
Copy Markdown

neither of @envoyproxy/senior-maintainers, for, the, second, pass can be assigned to this issue.

🐱

Caused by: a #18978 (comment) was created by @mathetake.

see: more, trace.

@mathetake

Copy link
Copy Markdown
Member

/assign-from @envoyproxy/senior-maintainers

@repokitteh-read-only

Copy link
Copy Markdown

@envoyproxy/senior-maintainers assignee is @zuercher

🐱

Caused by: a #18978 (comment) was created by @mathetake.

see: more, trace.

Comment thread source/server/admin/prometheus_stats.cc Resolved
@ggreenway ggreenway self-assigned this Nov 17, 2021

@zuercher zuercher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Generally, this looks good. I have one comment below

Comment thread source/server/admin/prometheus_stats.cc Resolved
Signed-off-by: Douglas Reid <[email protected]>

@zuercher zuercher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@ggreenway
ggreenway enabled auto-merge (squash) November 17, 2021 22:57
@zuercher

Copy link
Copy Markdown
Member

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #18978 (comment) was created by @zuercher.

see: more, trace.

@ggreenway
ggreenway merged commit bd87e8c into envoyproxy:main Nov 18, 2021
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.

Prometheus formatter should escape '"' and other characters and degrade gracefully when it cannot

6 participants