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

Allow disabling brearer token override from request in metrics store #4726

Merged
merged 3 commits into from
Sep 6, 2023

Conversation

pavolloffay
Copy link
Member

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
@pavolloffay pavolloffay requested a review from a team as a code owner September 5, 2023 13:02
@@ -88,6 +89,8 @@ func (opt *Options) AddFlags(flagSet *flag.FlagSet) {
"The period to wait for a connection to Prometheus when executing queries.")
flagSet.String(nsConfig.namespace+suffixTokenFilePath, defaultTokenFilePath,
"The path to a file containing the bearer token which will be included when executing queries against the Prometheus API.")
flagSet.Bool(nsConfig.namespace+suffixOverrideFromContext, true,
"Whether the bearer token should be overridden from context (incoming request)")
Copy link
Member

Choose a reason for hiding this comment

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

the phrasing is a bit confusing to me. In terms of functionality, it seems a priority list would be a more elegant solution that covers more use cases, e.g., e.g. --token-priority=context,file or --token-priority=file (the latter will achieve what this PR needs I think)

Copy link
Member Author

Choose a reason for hiding this comment

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

The priority is not supported by our bearertoken package

if tr.OverrideFromCtx {

I don't need the priority. I want to for the transport to always use the token regardless of what is in the context.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
@yurishkuro
Copy link
Member

yurishkuro commented Sep 6, 2023

booked #4732 for flaky test

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
plugin/metrics/prometheus/metricsstore/reader.go 100.00%
plugin/metrics/prometheus/options.go 100.00%

📢 Thoughts on this report? Let us know!.

@yurishkuro yurishkuro enabled auto-merge (squash) September 6, 2023 14:57
@yurishkuro yurishkuro merged commit 5742846 into jaegertracing:main Sep 6, 2023
31 checks passed
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.

2 participants