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

Expand interface to support trace links #523

Merged
merged 5 commits into from
Mar 12, 2024
Merged

Expand interface to support trace links #523

merged 5 commits into from
Mar 12, 2024

Conversation

Dale-Koenig
Copy link
Contributor

Opentelemetry supports indirect links to other spans. Expand the interface to support this, with backwards compatibility.

@Dale-Koenig Dale-Koenig added the Improved Improve or expand existing feature label Mar 1, 2024
virtual std::unique_ptr<IAlicaTrace> create(const std::string& opName, std::optional<const std::string> parent = std::nullopt) const = 0;
// Two argument version of create. Deprecated.
virtual std::unique_ptr<IAlicaTrace> create(const std::string& opName, std::optional<const std::string> parent = std::nullopt) const { return nullptr; }
virtual std::unique_ptr<IAlicaTrace> create(const std::string& opName, std::optional<const std::string> parent_context, const std::vector<SpanLink>&) const
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My idea is that if we make a breaking changes release, we can remove the two arg version and add default args to the three arg version.

@Dale-Koenig Dale-Koenig marked this pull request as ready for review March 5, 2024 02:39
@Dale-Koenig Dale-Koenig requested a review from abhi1287 March 5, 2024 03:10
@Dale-Koenig Dale-Koenig marked this pull request as draft March 6, 2024 01:47
@Dale-Koenig
Copy link
Contributor Author

I realized this doesn't really work. Since alica generates the traces for you, and the only interaction the user has is to create the context, to support links we must also support returning context with links included

@Dale-Koenig Dale-Koenig marked this pull request as ready for review March 6, 2024 05:58
@Dale-Koenig Dale-Koenig merged commit a22128c into devel Mar 12, 2024
4 checks passed
@Dale-Koenig Dale-Koenig deleted the dk/trace_links branch March 12, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improved Improve or expand existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants