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

Remote sampling support - AWS X-Ray #1859

Merged
merged 53 commits into from Apr 1, 2022
Merged
Changes from 2 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5d26be1
added dependabot for sampler module and util dir
bhautikpip Feb 22, 2022
cfcf1a7
initial code commit: getSamplingRules, getSamplingTargets and busines…
bhautikpip Feb 23, 2022
762ee2c
remove debugging logic
bhautikpip Feb 23, 2022
43d432b
fix clientID generation bug
bhautikpip Feb 23, 2022
3565ccf
added unit testing for remote sampling
bhautikpip Feb 25, 2022
7108aca
fixed minor issues and ran precommit
bhautikpip Feb 26, 2022
27567e0
Relayout reservoir and rule struct to ensure int64s are 8-byte aligned
bhautikpip Feb 28, 2022
d4ee60e
removed flaky test
bhautikpip Feb 28, 2022
02eb8a9
debugging upstream test failure
bhautikpip Feb 28, 2022
edc424a
fix data race failures in some tests
bhautikpip Feb 28, 2022
8551568
fix bug in attribute matching and minor changes
bhautikpip Mar 1, 2022
85a7548
addressed review comments: 1
bhautikpip Mar 2, 2022
755073c
Merge branch 'main' into remote-sampling-xray
hanyuancheung Mar 2, 2022
828627c
added use of montonic time and minor changes
bhautikpip Mar 2, 2022
31231d6
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
bhautikpip Mar 2, 2022
92ad67b
Merge branch 'remote-sampling-xray' of https://github.com/bhautikpip/…
bhautikpip Mar 2, 2022
0736097
fix flaky remote sampling test
bhautikpip Mar 2, 2022
bc0f85f
relayout the struct to fix unaligned atomic op issue
bhautikpip Mar 2, 2022
ff14fae
added leaky bucket logic for reservoir
bhautikpip Mar 8, 2022
1ce4b85
Merge branch 'main' into remote-sampling-xray
hanyuancheung Mar 8, 2022
3f7d44d
minor changes to fix some issues
bhautikpip Mar 8, 2022
47c8b79
Merge branch 'remote-sampling-xray' of https://github.com/bhautikpip/…
bhautikpip Mar 8, 2022
84730a1
fix test failures
bhautikpip Mar 8, 2022
629d1de
Merge branch 'main' into remote-sampling-xray
hanyuancheung Mar 9, 2022
98df8a4
removed epoch based logic when borrowing
bhautikpip Mar 9, 2022
83dba7b
Merge branch 'remote-sampling-xray' of https://github.com/bhautikpip/…
bhautikpip Mar 9, 2022
0737cbd
remove debugging lines
bhautikpip Mar 9, 2022
560ade1
Merge branch 'main' into remote-sampling-xray
bhautikpip Mar 10, 2022
7500f1e
address review comments
bhautikpip Mar 13, 2022
8a4c1dd
changed endpoint to be url.URL instead of string
bhautikpip Mar 14, 2022
0cf3224
added validate config inside new config and minor change
bhautikpip Mar 17, 2022
24bc286
removed util package and address minor comments
bhautikpip Mar 18, 2022
78874a9
moved timer and rand to xray package, minor changes
bhautikpip Mar 18, 2022
765f300
added more tests
bhautikpip Mar 18, 2022
47684c5
Merge branch 'main' into remote-sampling-xray
hanyuancheung Mar 21, 2022
cc384b8
improved testing from codecov/patch annotations
bhautikpip Mar 21, 2022
6da8e6f
Merge branch 'remote-sampling-xray' of https://github.com/bhautikpip/…
bhautikpip Mar 21, 2022
f8ab56e
Merge branch 'main' into remote-sampling-xray
bhautikpip Mar 21, 2022
cc7901c
addressed review comment
bhautikpip Mar 23, 2022
67caa10
Merge branch 'main' into remote-sampling-xray
bhautikpip Mar 23, 2022
1a07f6d
remove unnecessary config validation code and minor changes
bhautikpip Mar 24, 2022
50c1f3d
aaded race test and review comments changes
bhautikpip Mar 25, 2022
b0edd36
added custom deep copy implementation
bhautikpip Mar 25, 2022
b456c49
Merge branch 'main' into remote-sampling-xray
bhautikpip Mar 26, 2022
0bad9a6
update depandabot config
bhautikpip Mar 26, 2022
94cb0b7
added fallback sampler in case of rule match error and minor changes
bhautikpip Mar 28, 2022
6bfaa57
fix test failure
bhautikpip Mar 28, 2022
9adbf5a
Update samplers/aws/xray/internal/manifest.go
bhautikpip Mar 28, 2022
dfd0272
added API description: minor change
bhautikpip Mar 29, 2022
779e93f
Merge branch 'remote-sampling-xray' of https://github.com/bhautikpip/…
bhautikpip Mar 29, 2022
7626b7e
Merge branch 'main' into remote-sampling-xray
bhautikpip Mar 29, 2022
1c77778
Update samplers/aws/xray/remote_sampler.go
bhautikpip Mar 29, 2022
1fc8df8
minor change: modified matchers to return true directly
bhautikpip Mar 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions samplers/aws/xray/remote_sampler.go
Expand Up @@ -53,6 +53,8 @@ var _ sdktrace.Sampler = (*remoteSampler)(nil)
// based on the sampling rules set by users on AWS X-Ray console. Sampler also periodically polls
// sampling rules and sampling targets.
// NOTE: ctx passed in NewRemoteSampler API is being used in background go routine. Cancellation to this context can kill the background go routine.
// serviceName refers to the name of the service equivalent to set by customers on AWS X-Ray console when adding sampling rules and
// cloudPlatform refers to the environment service is running on (EC2, EKS etc).
bhautikpip marked this conversation as resolved.
Show resolved Hide resolved
// Guide on AWS X-Ray remote sampling implementation (https://aws-otel.github.io/docs/getting-started/remote-sampling#otel-remote-sampling-implementation-caveats).
func NewRemoteSampler(ctx context.Context, serviceName string, cloudPlatform string, opts ...Option) (sdktrace.Sampler, error) {
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
MrAlias marked this conversation as resolved.
Show resolved Hide resolved
// Create new config based on options or set to default values.
Expand Down