Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aws-observability/aws-otel-go
/ functions
Functions
179 in github.com/aws-observability/aws-otel-go
⨍
Functions
179
◇
Types & classes
32
↓ 30 callers
Method
now
now function returns the fixed time value stored in c.
samplers/aws/xray/internal/clock.go:33
↓ 24 callers
Method
take
take consumes quota from reservoir, if any remains, then returns true. False otherwise.
samplers/aws/xray/internal/reservoir.go:50
↓ 13 callers
Function
createTestClient
(t *testing.T, body []byte)
samplers/aws/xray/internal/client_test.go:18
↓ 9 callers
Method
appliesTo
2025-05-07: Begin Amazon modification. appliesTo performs a matching against rule properties to see if a given rule does match with any of the rule se
samplers/aws/xray/internal/rule.go:121
↓ 9 callers
Function
createSamplingTargetDocument
(name string, interval int64, rate, quota, ttl float64)
samplers/aws/xray/internal/manifest_test.go:23
↓ 9 callers
Function
newConfig
(opts ...Option)
samplers/aws/xray/remote_sampler_config.go:71
↓ 9 callers
Function
wildcardMatch
wildcardMatch returns true if text matches pattern at the given case-sensitivity; returns false otherwise.
samplers/aws/xray/internal/match.go:16
↓ 8 callers
Method
Sample
Sample uses sampling targets of a given rule to decide which sampling should be done and returns a SamplingResult.
samplers/aws/xray/internal/rule.go:72
↓ 7 callers
Method
MatchAgainstManifestRules
MatchAgainstManifestRules returns a Rule and boolean flag set as true if rule has been match against span attributes, otherwise nil and false.
samplers/aws/xray/internal/manifest.go:80
↓ 7 callers
Method
RefreshManifestRules
RefreshManifestRules writes sampling rule properties to the manifest object.
samplers/aws/xray/internal/manifest.go:100
↓ 6 callers
Method
getSamplingRules
getSamplingRules calls the collector(aws proxy enabled) for sampling rules.
samplers/aws/xray/internal/client.go:129
↓ 6 callers
Method
getSamplingTargets
getSamplingTargets calls the collector(aws proxy enabled) for sampling targets.
samplers/aws/xray/internal/client.go:158
↓ 6 callers
Method
take
take consumes quota from reservoir, if any remains, then returns true. False otherwise.
samplers/aws/xray/fallback_sampler.go:56
↓ 6 callers
Method
updateReservoir
(t *samplingTargetDocument)
samplers/aws/xray/internal/manifest.go:261
↓ 6 callers
Method
updateRules
(rules *getSamplingRulesOutput)
samplers/aws/xray/internal/manifest.go:158
↓ 6 callers
Method
updateTargets
(targets *getSamplingTargetsOutput)
samplers/aws/xray/internal/manifest.go:216
↓ 5 callers
Function
NewFallbackSampler
NewFallbackSampler returns a FallbackSampler which samples 1 req/sec and additional 5% of requests using traceIDRatioBasedSampler.
samplers/aws/xray/fallback_sampler.go:29
↓ 5 callers
Method
attributeMatching
End of Amazon modification. attributeMatching performs a match on attributes set by users on AWS X-Ray console.
samplers/aws/xray/internal/rule.go:223
↓ 5 callers
Method
deepCopy
deepCopy copies the m to another manifest object.
samplers/aws/xray/internal/manifest.go:312
↓ 5 callers
Method
minimumPollingInterval
minimumPollingInterval finds the minimum polling interval for all the targets of m's Rules.
samplers/aws/xray/internal/manifest.go:370
↓ 5 callers
Function
newClient
newClient returns an HTTP client with proxy endpoint.
samplers/aws/xray/internal/client.go:113
↓ 5 callers
Method
now
()
samplers/aws/xray/internal/clock.go:15
↓ 4 callers
Method
Close
()
exporters/xrayudp/udp_exporter.go:23
↓ 4 callers
Method
RefreshManifestTargets
RefreshManifestTargets updates sampling targets (statistics) for each rule.
samplers/aws/xray/internal/manifest.go:114
↓ 4 callers
Method
Stop
Stop shuts down the UDP Exporter.
exporters/xrayudp/client.go:61
↓ 4 callers
Function
WithEndpoint
WithEndpoint sets custom proxy endpoint. If this option is not provided the default endpoint used will be http://127.0.0.1:2000.
samplers/aws/xray/remote_sampler_config.go:44
↓ 4 callers
Function
WithSamplingRulesPollingInterval
WithSamplingRulesPollingInterval sets polling interval for sampling rules. If this option is not provided the default samplingRulesPollingInterval use
samplers/aws/xray/remote_sampler_config.go:53
↓ 4 callers
Method
Write
([]byte)
exporters/xrayudp/udp_exporter.go:22
↓ 4 callers
Method
refreshQuotaBalanceLocked
refreshQuotaBalanceLocked refreshes the quotaBalance. If borrowed is true then add to the quota balance 1 by every second, otherwise add to the quota
samplers/aws/xray/internal/reservoir.go:87
↓ 4 callers
Method
snapshots
snapshots takes a snapshot of sampling statistics from all rules, resetting statistics counters in the process.
samplers/aws/xray/internal/manifest.go:295
↓ 4 callers
Method
stale
stale checks if targets (sampling stats) for a given rule is expired or not.
samplers/aws/xray/internal/rule.go:44
↓ 3 callers
Method
expired
expired returns true if current time is past expiration timestamp. Otherwise, false is returned if no quota remains.
samplers/aws/xray/internal/reservoir.go:42
↓ 3 callers
Function
handleErr
(err error, message string)
sampleapp/main.go:162
↓ 3 callers
Method
refreshManifest
refreshManifest refreshes the manifest retrieved via getSamplingRules API.
samplers/aws/xray/remote_sampler.go:159
↓ 3 callers
Method
sort
sort sorts the Rules of m first by priority and then by name.
samplers/aws/xray/internal/manifest.go:358
↓ 2 callers
Method
Expired
Expired returns true if the manifest has not been successfully refreshed in manifestTTL seconds.
samplers/aws/xray/internal/manifest.go:70
↓ 2 callers
Function
NewClient
NewClient creates a new OTLP UDP trace client.
exporters/xrayudp/client.go:34
↓ 2 callers
Function
NewUdpExporter
(endpoint string)
exporters/xrayudp/udp_exporter.go:33
↓ 2 callers
Method
SendData
(data []byte, signalFormatPrefix string)
exporters/xrayudp/udp_exporter.go:62
↓ 2 callers
Method
ShouldSample
ShouldSample matches span attributes with retrieved sampling rules and returns a sampling result. If the sampling parameters do not match or the manif
samplers/aws/xray/remote_sampler.go:80
↓ 2 callers
Method
Start
Start does nothing in an OTLP UDP client.
exporters/xrayudp/client.go:50
↓ 2 callers
Method
UploadTraces
UploadTraces sends a batch of spans to the UDP Exporter.
exporters/xrayudp/client.go:66
↓ 2 callers
Function
WithEndpoint
WithEndpoint sets custom daemon endpoint. If this option is not provided, a default endpoint will be used.
exporters/xrayudp/config.go:26
↓ 2 callers
Function
WithSignalPrefix
(signalPrefix string)
exporters/xrayudp/config.go:33
↓ 2 callers
Method
apply
(*config)
exporters/xrayudp/config.go:15
↓ 2 callers
Method
c
c returns a channel that receives when the ticker fires.
samplers/aws/xray/timer.go:35
↓ 2 callers
Function
createTestClientWithStatusCode
(t *testing.T, status int, body []byte)
samplers/aws/xray/internal/client_test.go:22
↓ 2 callers
Function
generateClientID
generateClientID generates random client ID.
samplers/aws/xray/internal/manifest.go:386
↓ 2 callers
Function
getXrayTraceID
(span trace.Span)
sampleapp/main.go:156
↓ 2 callers
Function
newTicker
newTicker creates a new Ticker that will send the current time on its channel with the passed jitter.
samplers/aws/xray/timer.go:22
↓ 2 callers
Method
snapshot
snapshot takes a snapshot of the sampling statistics counters, returning samplingStatisticsDocument. It also resets statistics counters.
samplers/aws/xray/internal/rule.go:53
↓ 1 callers
Method
Description
Description returns description of the sampler being used.
samplers/aws/xray/fallback_sampler.go:51
↓ 1 callers
Method
Description
Description returns description of the sampler being used.
samplers/aws/xray/remote_sampler.go:105
↓ 1 callers
Function
NewManifest
NewManifest return manifest object configured the passed with logging and an xrayClient configured to address addr.
samplers/aws/xray/internal/manifest.go:46
↓ 1 callers
Function
NewSpanExporter
NewSpanExporter constructs a new X-Ray UDP Span Exporter and starts it.
exporters/xrayudp/exporter.go:13
↓ 1 callers
Method
SendData
(data []byte, signalFormatPrefix string)
exporters/xrayudp/client.go:24
↓ 1 callers
Method
ShouldSample
ShouldSample implements the logic of borrowing 1 req/sec and then use traceIDRatioBasedSampler to sample 5% of additional requests.
samplers/aws/xray/fallback_sampler.go:37
↓ 1 callers
Method
Shutdown
()
exporters/xrayudp/udp_exporter.go:75
↓ 1 callers
Method
Shutdown
()
exporters/xrayudp/client.go:23
↓ 1 callers
Function
Version
import "github.com/aws-observability/aws-otel-go/samplers/aws/xray" End of Amazon modification. Version is the current release version of the AWS XRay
samplers/aws/xray/version.go:10
↓ 1 callers
Function
WithLogger
WithLogger sets custom logging for remote sampling implementation. If this option is not provided the default logger used will be go-logr/stdr (https:
samplers/aws/xray/remote_sampler_config.go:62
↓ 1 callers
Method
createRule
(ruleProp ruleProperties)
samplers/aws/xray/internal/manifest.go:202
↓ 1 callers
Function
initProvider
()
sampleapp/main.go:119
↓ 1 callers
Function
isLambdaEnvironment
()
exporters/xrayudp/config.go:60
↓ 1 callers
Function
newConfig
(opts ...Option)
exporters/xrayudp/config.go:40
↓ 1 callers
Function
newGlobalRand
()
samplers/aws/xray/rand.go:27
↓ 1 callers
Function
newSeed
()
samplers/aws/xray/rand.go:16
↓ 1 callers
Function
parseEndpoint
(endpoint string)
exporters/xrayudp/udp_exporter.go:79
↓ 1 callers
Method
refreshQuotaBalanceLocked
refreshQuotaBalanceLocked refreshes the quotaBalance considering elapsedTime. It is assumed the lock is held when calling this.
samplers/aws/xray/fallback_sampler.go:82
↓ 1 callers
Method
refreshTargets
refreshTarget refreshes the sampling targets in manifest retrieved via getSamplingTargets API.
samplers/aws/xray/remote_sampler.go:168
↓ 1 callers
Method
start
(ctx context.Context)
samplers/aws/xray/remote_sampler.go:109
↓ 1 callers
Method
startPoller
startPoller starts the rule and target poller in a single go routine which runs periodically to refresh the manifest and targets.
samplers/aws/xray/remote_sampler.go:118
↓ 1 callers
Function
toRegexPattern
(pattern string)
samplers/aws/xray/internal/match.go:40
Method
Close
()
exporters/xrayudp/udp_exporter_test.go:31
Function
NewRemoteSampler
NewRemoteSampler returns a sampler which decides to sample a given request or not based on the sampling rules set by users on AWS X-Ray console. Sampl
samplers/aws/xray/remote_sampler.go:51
Function
SemVersion
SemVersion is the semantic version to be supplied to tracer/meter creation. Deprecated: Use [Version] instead.
samplers/aws/xray/version.go:18
Method
SendData
(data []byte, signalFormatPrefix string)
exporters/xrayudp/client_test.go:25
Method
Shutdown
()
exporters/xrayudp/client_test.go:22
Function
TestAppliesToExitEarlyNoMatch
assert early exit when rule properties retrieved from AWS X-Ray console does not match with span attributes.
samplers/aws/xray/internal/rule_test.go:366
Function
TestAppliesToHTTPTargetMatching
assert that when attribute has http.url is empty, uses http.target wildcard matching.
samplers/aws/xray/internal/rule_test.go:344
Function
TestAppliesToMatchingWithAllAttrs
2025-05-07: Begin Amazon modification.
samplers/aws/xray/internal/rule_test.go:218
Function
TestAppliesToMatchingWithHTTPAttrsNoSpanAttrs
assert that matching will not happen when rules has all the HTTP attrs set as non '*' values and span has no HTTP attributes.
samplers/aws/xray/internal/rule_test.go:270
Function
TestAppliesToMatchingWithPartialHTTPAttrsNoSpanAttrs
assert that matching will not happen when rules has some HTTP attrs set as non '*' values and span has no HTTP attributes.
samplers/aws/xray/internal/rule_test.go:308
Function
TestAppliesToMatchingWithStarHTTPAttrs
End of Amazon modification. assert that matching will happen when rules has all the HTTP attrs set as '*' and span has any attribute values.
samplers/aws/xray/internal/rule_test.go:245
Function
TestAppliesToMatchingWithStarHTTPAttrsNoSpanAttrs
assert that matching will happen when rules has all the HTTP attrs set as '*' values and span has no HTTP attributes.
samplers/aws/xray/internal/rule_test.go:289
Function
TestAppliesToNoMatching
assert that matching will not happen when rule and span ServiceType attr value is different.
samplers/aws/xray/internal/rule_test.go:326
Function
TestAttributeMatching
assert that if rules has attribute and span has those attribute with same value then matching will happen.
samplers/aws/xray/internal/rule_test.go:478
Function
TestAttributeMatchingNoRuleAttrs
assert that if rules has no attributes then matching will happen.
samplers/aws/xray/internal/rule_test.go:499
Function
TestAttributeWildCardMatching
assert that wildcard attributes will match.
samplers/aws/xray/internal/rule_test.go:517
Function
TestBorrowEverySecond
assert that borrow only 1 req/sec.
samplers/aws/xray/internal/reservoir_test.go:45
Function
TestBorrowOnePerSecond
assert that we only borrow 1 req/sec.
samplers/aws/xray/fallback_sampler_test.go:26
Function
TestBorrowWithLargeElapsedTime
assert that when elapsedTime is high quotaBalance should still be close to 1.
samplers/aws/xray/fallback_sampler_test.go:45
Function
TestConsumeFromBorrowConsumeFromQuota
assert that when reservoir is expired we consume from quota is 1 and then when reservoir is not expired consume from assigned quota by X-Ray service.
samplers/aws/xray/internal/reservoir_test.go:71
Function
TestConsumeFromReservoir
assert that we can still borrowing from reservoir is possible since assigned quota is available to consume and it will increase used count.
samplers/aws/xray/internal/reservoir_test.go:112
Function
TestConsumeFromReservoirSample
assert that reservoir is not expired, quota is available so consuming from quota.
samplers/aws/xray/internal/rule_test.go:149
Function
TestDeepCopy
assert that deep copy creates a new manifest object with new address space.
samplers/aws/xray/internal/manifest_test.go:1243
Function
TestDefaultConfig
assert that when user did not provide values are then config would be picked up from default values.
samplers/aws/xray/remote_sampler_config_test.go:31
Function
TestDoNotPreserveRulesWithDifferentRuleProperties
Validate Rules are NOT preserved when a rule is updated with a different ruleProperties with the same RuleName.
samplers/aws/xray/internal/manifest_test.go:1715
Function
TestEndpointIsNotReachable
(t *testing.T)
samplers/aws/xray/internal/client_test.go:248
Function
TestExpiredManifest
assert that manifest is expired.
samplers/aws/xray/internal/manifest_test.go:51
next →
1–100 of 179, ranked by callers