-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[jaeger-v2] Add remotesampling
extension
#5389
[jaeger-v2] Add remotesampling
extension
#5389
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5389 +/- ##
==========================================
- Coverage 96.88% 96.70% -0.18%
==========================================
Files 335 341 +6
Lines 16156 16444 +288
==========================================
+ Hits 15652 15902 +250
- Misses 335 354 +19
- Partials 169 188 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I am thinking of this approach.:
That's how it works in the current Jaeger collector, but we are serving this API in the collector server. Here, we have to create a new one. suggestions |
One more question: How can I run hotrod with jaeger-v2 binary? |
We need a
We also need an
All of this should require very minimal implementation, primarily just wiring up the existing components already implemented in |
The existing component (from jaeger v1) are in blue: flowchart LR
Receiver --> AdaptiveSamplingProcessor --> BatchProcessor --> Exporter
Exporter -->|"(1) get storage"| JaegerStorageExension
Exporter -->|"(2) write trace"| TraceStorage
AdaptiveSamplingProcessor -->|"getStorage()"| StorageConfig
OTEL_SDK[OTEL
SDK]
OTEL_SDK -->|"(1) GET /sampling"| HTTP_endpoint
HTTP_endpoint -->|"(2) getStrategy()"| StrategiesProvider
style HTTP_endpoint fill:blue,color:white
subgraph Jaeger Collector
Receiver
BatchProcessor[Batch
Processor]
Exporter
TraceStorage[(Trace
Storage)]
AdaptiveSamplingProcessor[Adaptive
Sampling
Processor]
AdaptiveSamplingProcessorV1[Adaptive
Sampling
Processor_v1]
style AdaptiveSamplingProcessorV1 fill:blue,color:white
AdaptiveSamplingProcessor -->|"[]*model.Span"| AdaptiveSamplingProcessorV1
AdaptiveSamplingProcessorV1 ---|use| SamplingStorage
subgraph JaegerStorageExension[Jaeger Storage Exension]
Storage[[Storage
Config]]
end
subgraph RemoteSamplingExtension[Remote Sampling Extension]
StrategiesProvider -->|"(3b) getStrategy()"| AdaptiveProvider
StrategiesProvider -->|"(3a) getStrategy()"| FileProvider
FileProvider --> FileConfig
AdaptiveProvider --> StorageConfig
HTTP_endpoint[HTTP
endpoint]
StrategiesProvider[Strategies
Provider]
FileProvider[File
Provider]
AdaptiveProvider[Adaptive
Provider]
style StrategiesProvider fill:blue,color:white
style FileProvider fill:blue,color:white
style AdaptiveProvider fill:blue,color:white
subgraph Config
FileConfig[[File Config]]
StorageConfig[[Storage Config]]
end
StorageConfig --- SamplingStorage
SamplingStorage[(Sampling
Storage)]
style SamplingStorage fill:blue,color:white
end
end
|
remotesampling
extension
i haven;t pushed latest changes yet. |
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.
looks good, in the right direction
cmd/jaeger/internal/extension/remotesampling/testdata/strategy.json
Outdated
Show resolved
Hide resolved
## Which problem is this PR solving? - part of #5389 ## Description of the changes - processor is co-located in strategy_store and aggregator. - In aggregator to run `generateStrategyResponses`, `runCalculationLoop`. - In strategy_store to run `loadProbabilities`, `runUpdateProbabilitiesLoop` ## How was this change tested? - `make test` ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Pushkar Mishra <[email protected]> Signed-off-by: pushkarm029 <[email protected]>
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.
how do you plan to test it?
cmd/jaeger/config-badger.yaml
Outdated
# file: | ||
# path: ./cmd/jaeger/sampling-strategies.json |
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.
maybe we should default to file, not to more complex adaptive?
## Which problem is this PR solving? - #5389 (comment) ## Description of the changes - Refactored `handleRootSpan` logic into a helper method in aggregator.go.
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.
please fix the DCO and keep it green
Signed-off-by: Yuri Shkuro <[email protected]>
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.
@Pushkarm029 this looks to be in a good shape, we just need to bump test coverage. I verified that the server starts and serves sampling strategies over HTTP.
Signed-off-by: Yuri Shkuro <[email protected]>
thanks, I will start writing tests now. |
Signed-off-by: pushkarm029 <[email protected]>
Halfway🛣️ |
Signed-off-by: pushkarm029 <[email protected]>
Signed-off-by: Pushkar Mishra <[email protected]>
Signed-off-by: pushkarm029 <[email protected]>
Signed-off-by: pushkarm029 <[email protected]>
Signed-off-by: pushkarm029 <[email protected]>
80% Done, few more to go |
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
@Pushkarm029 I added a few more test and am going to merge it, because the PR has been open for a long time. The coverage is almost there, we can write extra tests (mostly for remotesampling/extension) separately.
|
## Description of the changes - Part of jaegertracing#5531 - adds static sampling support for otel-based jaeger-v2. - supports hot reload - added unit tests ## How was this change tested? - `go run -tags=ui ./cmd/jaeger --config ./cmd/jaeger/config-badger.yaml` - `make test` ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: pushkarm029 <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: Pushkar Mishra <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
Description of the changes
How was this change tested?
go run -tags=ui ./cmd/jaeger --config ./cmd/jaeger/config-badger.yaml
make test
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test