-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[WIP] Enabling CORS settings on OTLP Reciever HTTP endpoint #4549
Closed
Closed
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
faac2ef
configuring allowed headers and alloewed origins in OTLP reciever HTT…
severussnape321 6baee5c
Merge branch 'main' of https://github.com/pmuls99/jaeger into enableC…
severussnape321 e27c5fe
Merge branch 'main' of https://github.com/pmuls99/jaeger into enableC…
severussnape321 df13374
Merge branch 'jaegertracing:main' into enableCORSSettings
pmuls99 6c38a23
Merge branch 'main' of https://github.com/pmuls99/jaeger into enableC…
severussnape321 a3f4b32
added a new pkg,corscfg to enable cors on OTLP and Zipkin
severussnape321 e87329d
Merge branch 'enableCORSSettings' of https://github.com/pmuls99/jaege…
severussnape321 771142d
fixed a minor mistake
severussnape321 4e14f48
Merge branch 'main' into enableCORSSettings
pmuls99 cc8c6c2
Merge branch 'main' of https://github.com/pmuls99/jaeger into enableC…
severussnape321 6ef3983
Merge branch 'enableCORSSettings' of https://github.com/pmuls99/jaege…
severussnape321 9e90575
made several minor changes
severussnape321 73d3621
changed the name of corscfg file to options.go
severussnape321 148f357
Merge branch 'main' of https://github.com/pmuls99/jaeger into enableC…
severussnape321 52bfc4b
fixed naming convention
severussnape321 ce035f4
[hotrod]: Upgrade `redis` service to native OTEL instrumentation
afzal442 f7e4614
[test] Avoid logging to testing.T from server goroutine (#4546)
yurishkuro ae8e44e
configuring allowed headers and alloewed origins in OTLP reciever HTT…
severussnape321 6139771
Bump anchore/sbom-action from 0.14.1 to 0.14.3 (#4552)
dependabot[bot] 2991952
Add readme
yurishkuro 3fc7182
Rebuild jaeger-ui if the tree does not match any tag exactly (#4553)
bobrik 1185b1b
Support normalized metric names (#4555)
albertteoh 0b1dbf8
Fix OTEL logging in HotRod example (#4556)
albertteoh 7fdf0e7
[hotROD] Replace gRPC instrumentation with OTEL (#4558)
afzal442 e7b3c3a
[hotROD] Add OTEL instrumentation to customer svc (#4559)
afzal442 dbf602b
Configure groups for dependabot
yurishkuro fbf4c55
Reduce dependabot pattern to 50 chars
yurishkuro 4b41175
Bump the otel-collector group with 2 updates (#4563)
dependabot[bot] 58624c1
Bump the hashicorp group with 1 update (#4562)
dependabot[bot] c18134d
Bump step-security/harden-runner from 2.4.0 to 2.4.1 (#4551)
dependabot[bot] 93f278c
Bump golang.org/x/sys from 0.9.0 to 0.10.0 (#4564)
dependabot[bot] 550f688
Bump the otel-collector group with 1 update (#4568)
dependabot[bot] 97ee792
Bump golang.org/x/net from 0.11.0 to 0.12.0 (#4569)
dependabot[bot] c1bd659
[tracegen] Enable OTEL debug logging (#4571)
yurishkuro 5ec2657
Prepare release v1.47.0 (#4570)
jkowall 43522da
[hotrod] Handle both OT and OTEL baggage (#4572)
yurishkuro 4e82597
Bump grpcio from 1.50.0 to 1.53.0 in /docker-compose/monitor (#4567)
dependabot[bot] 1e6c97c
[hotrod] Bump jquery to 3.7.0 (#4577)
yurishkuro 98b1423
[tracegen] Enable BlockOnQueueFull in OTel SDK to avoid dropped spans…
haanhvu 1d3ed07
Raise awareness of current Russia-Ukraine situation, targeting Russia…
yurishkuro 44a4b6a
Fix link
yurishkuro 58e2bdb
added a new pkg,corscfg to enable cors on OTLP and Zipkin
severussnape321 c4350e3
fixed a minor mistake
severussnape321 c54ce55
[kafka-consumer] Use wait group to ensure goroutine is finished befor…
kennyaz a29eb29
made several minor changes
severussnape321 90307e3
changed the name of corscfg file to options.go
severussnape321 bbacd0c
[hotrod] Upgrade HotROD to use OpenTelemetry instrumentation (#4548)
afzal442 be840c4
[hotrod] Validate user input to avoid security warnings from code sca…
yurishkuro aa0169e
fixed naming convention
severussnape321 8832a94
Merge branch 'enableCORSSettings' of https://github.com/pmuls99/jaege…
severussnape321 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2023 The Jaeger Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package corscfg | ||
|
||
import ( | ||
"flag" | ||
|
||
"github.com/spf13/viper" | ||
) | ||
|
||
const ( | ||
corsPrefix = ".cors" | ||
corsAllowedHeaders = corsPrefix + ".allowed-headers" | ||
corsAllowedOrigins = corsPrefix + ".allowed-origins" | ||
) | ||
|
||
type Flags struct { | ||
Prefix string | ||
} | ||
|
||
func (c Flags) AddFlags(flags *flag.FlagSet) { | ||
flags.String(c.Prefix+corsAllowedHeaders, "content-type", "Allowed headers for the HTTP port , default content-type") | ||
flags.String(c.Prefix+corsAllowedOrigins, "*", "Allowed origins for the HTTP port , default accepts all") | ||
} | ||
|
||
func (c Flags) InitFromViper(v *viper.Viper) Options { | ||
var p Options | ||
p.AllowedHeaders = v.GetStringSlice(c.Prefix + corsAllowedHeaders) | ||
p.AllowedOrigins = v.GetStringSlice(c.Prefix + corsAllowedOrigins) | ||
return p | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) 2023 The Jaeger Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package corscfg | ||
|
||
type Options struct { | ||
AllowedOrigins []string `mapstructure:"allowed_origins"` | ||
AllowedHeaders []string `mapstructure:"allowed_headers"` | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that previously we were stripping whitespace
Is it going to be done automatically by
viper.GetStringSlice
? If not it's not a backwards compatible change.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add tests to this package? it's small and has no external deps, no reason not to write tests, and in particular validate ^^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just checking with you if I was going in the right direction , since I am new to the community. I will write the tests and validate soon, sorry for the delay!