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

feat(RFC): Add Internal Trace Model. #20170

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hdost
Copy link
Contributor

@hdost hdost commented Mar 25, 2024

Provides a path forward for integrating sources and sinks for Tracing.

Relates #1444, #17307, #17308

rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
@hdost hdost force-pushed the add-trace-data-model branch 2 times, most recently from 8e75624 to 3663ec9 Compare March 25, 2024 13:08
Copy link
Member

@jszwedko jszwedko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @hdost . We'll try to review it next week in more detail.

rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved

As OpenTelemetry is the primary model the this will only describe the data types. The top level
`TraceEvent` will represent a top level proto `message ResourceSpans`.
`Value::Object`. The remaining proto to mappings can be found:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining mappings of what?

rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved

- Define a Vector Trace event model schema.
- Support for Links between `TraceEvent`s.
- Defining a mapping between the Vector trace event model to the Datadog trace event (one direction).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need both directions, no? The datadog_agent source needs to decode it and the datadog_traces sink needs to encode it.

rfcs/2024-03-22-20170-trace-data-model.md Outdated Show resolved Hide resolved
@bruceg
Copy link
Member

bruceg commented Apr 11, 2024

We discussed this internally and agree with the general direction of this proposal. It makes sense to adopt the the OpenTelemetry data types as the internal model, since the OTel project has defined many mappings to and from their data model for other trace types. So it stands as a useful intermediate representation for many kinds of traces.

However, if we are going to adopt that data model, we would prefer it be implemented in a more structured form. Specifically, we would want all of the data structures, were possible, to become fixed Rust structs instead of a generic map type. This would echo our metric types, which can represent a variety of different kinds of metrics with a fixed structure. This will simplify all kinds of code managing conversion to and from other data types, such as protobufs or other trace models, since they can rely on the presence of certain fields at a source code level.

As such, we would like to see the above reflected in the RFC. It should contain source code specifics of what the structures would look like and, if appropriate, what methods would be made available for manipulating them. Since this isn't a completely different direction, we don't think it requires a complete overhaul of this document but it does require changing the core data types, which means that consideration is very much in scope.

Some examples from existing RFCs to show what that might look like:

Many other RFCs contain Rust code samples, as we intend for these documents to be very opinionated as to the target solution, with many of the implications worked out.

@hdost
Copy link
Contributor Author

hdost commented Apr 12, 2024

Thank you for the thorough review, I'll take some time to reformulate with all that in mind.

@jszwedko jszwedko added the meta: awaiting author Pull requests that are awaiting their author. label May 3, 2024
@jszwedko jszwedko requested a review from a team as a code owner October 3, 2024 18:54
@zsbfg
Copy link

zsbfg commented Dec 19, 2024

@hdost - Just curious - has this PR been abandoned due to time constraints or did you move to another technology solution and no longer need to move forward with this PR in vector?

@hdost
Copy link
Contributor Author

hdost commented Dec 28, 2024

@hdost - Just curious - has this PR been abandoned due to time constraints or did you move to another technology solution and no longer need to move forward with this PR in vector?

Time constraints I'm afraid, but I should be spending some time soon again. However, don't be afraid to continue to patch it if you wish. I can always try to pick up. Just tag me on your pr

@hdost hdost force-pushed the add-trace-data-model branch 2 times, most recently from 4f6f316 to e9161a5 Compare December 30, 2024 23:43
@hdost hdost force-pushed the add-trace-data-model branch from e9161a5 to 8a4bd51 Compare December 30, 2024 23:52
@hdost hdost requested review from jszwedko and bruceg December 30, 2024 23:53
@zsbfg
Copy link

zsbfg commented Jan 2, 2025

Thanks @hdost - I was hoping (selfishly) that you were going to be able work on this soon. I very much appreciate your time and attention.

@hdost
Copy link
Contributor Author

hdost commented Jan 11, 2025

@jszwedko I made some significant updates. I want to make sure it's going in the right direction as mentioned before. I apologize for the long delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: rfc meta: awaiting author Pull requests that are awaiting their author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants