-
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
Implement adjusters to operate on OTLP data format #6344
Comments
…#6346) ## Which problem is this PR solving? - Towards #6344 ## Description of the changes - This PR adds an interface for `Adjuster` to operate on the OTLP model format so that it can be used by the v2 query service. The v1 interface/implementation can be found in `model/adjuster`. - In the following PRs, we'll implement all the standard adjusters in `model/adjuster` to implement the new interface. ## How was this change tested? - Unit tests ## 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: Mahad Zaryab <[email protected]>
…del (#6354) ## Which problem is this PR solving? - Towards #6344 ## Description of the changes - This PR implements the `SpanReferences` adjuster to operate on the OTLP data model. In the OTLP model, references are dubbed as links so the adjuster was renamed to `SpanLinks` ## How was this change tested? - Added unit tests ## 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`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
…a model (#6355) ## Which problem is this PR solving? - Towards #6344 ## Description of the changes - This PR implements the `IPTag` adjuster to operate on the OTLP data model. In the OTLP model, tags are dubbed as attributes so the adjuster was renamed to `IPAttribute`. ## How was this change tested? - Added unit tests ## 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`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
The parent reference adjuster is not needed when operating on the OTLP data model because because the parent span ID is recorded explicitly on the span instead of a reference (or a link in OTLP terminology). |
…ata model (#6358) ## Which problem is this PR solving? - Towards #6344 ## Description of the changes - This PR implements the `OTelTag` adjuster to operate on the OTLP data model. In the OTLP model, tags are dubbed as attributes so the adjuster was renamed to `OTELAttribute`. ## How was this change tested? - Added unit tests ## 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`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
Some adjusters cannot be implemented in OTLP in the same way. For example, pdata.Traces has no place to store warnings, and the sorting adjuster won't work because pdata uses maps internally for attributes. Given that the UI isn't going to accept OTLP anytime soon, even if the internals and APIs like APIv3 all support OTLP we would still need a transformation into UI JSON data model, which is easiest to achieve today with |
Also, we might already have some data loss in the |
@yurishkuro I don't follow this point. Would you be able to elaborate? How do we have data loss? |
Suppose we utilize Span.Warnings on the ingestion path. It gets stored in the database, and then v1 reader re-inflates it back into Span.Warnings. But then when we wrap that reader into adapter reader, we call model2pdata from OTEL, which may ignore Span.Warnings and they get lost. We can check how that transform is implemented and perhaps fix it to use the same |
Got it. We can fix this by adding a wrapper around the translator in jptrace like you suggested. There's already an item on the checklist for that. |
…turn implemented struct (#6362) ## Which problem is this PR solving? - Towards #6344 ## Description of the changes - This PR performs the following refactorings to the adjuster package - Remove the `Func` alias - Change the implemented adjusters to return a struct that implements the Adjuster interface - Change the interface to only return an error to indicate that traces are modified in place - Move the warnings utility to `cmd/query/app/internal/jotlp` ## How was this change tested? - CI and unit tests ## 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`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
## Which problem is this PR solving? - Towards #6344 ## Description of the changes - Add a warning to the `SpanLinks` adjuster when there is a bad span link to match the behaviour of the v1 adjuster (https://github.com/jaegertracing/jaeger/blob/main/model/adjuster/bad_span_references.go#L40) ## How was this change tested? - Updated unit tests ## 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`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
…lp data model (#6367) ## Which problem is this PR solving? - Towards #6344 ## Description of the changes - Implement the Span ID Uniquifier adjuster to operate on the OTLP data model. ## How was this change tested? - Unit tests ## 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`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
Today, we have adjusters in
model/adjuster
that perform modifications to a trace object. We want to implement v2 versions of all these adjusters that operate directly on the OTLP data format (ptrace.traces
instead of onmodel.Trace
).The text was updated successfully, but these errors were encountered: