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

Indicate if a span's parent or link is remote using 2 bit flag as described in OTEP 0182 #484

Merged
merged 31 commits into from
Jan 23, 2024

Conversation

estolfo
Copy link
Contributor

@estolfo estolfo commented Jun 13, 2023

This adds parent_span_is_remote field to Span message introduced in OTEP 0182: https://github.com/open-telemetry/oteps/blob/main/text/0182-otlp-remote-parent.md

Update: The PR now uses 2 bits from flags to represent the 3 states of parent or link is remote: unknown, not remote, is remote.

@estolfo estolfo requested review from a team June 13, 2023 11:24
Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

I am blocking this until we make 1.0 release. Ideally we don't want any changes other than bug fixes between the RC that we just did and the final release.

@estolfo
Copy link
Contributor Author

estolfo commented Jul 17, 2023

Hi @tigrannajaryan @Oberon00 @bogdandrutu can we reopen this discussion now that v1.0 is out?

@tigrannajaryan tigrannajaryan dismissed their stale review July 17, 2023 18:26

v1.0 is out, no reason to block this PR further.

@carlosalberto
Copy link
Contributor

(added it to the Spec call agenda next week)

@carolabadeer
Copy link

Hi @tigrannajaryan @Oberon00 @carlosalberto, any updates on this discussion?

@Oberon00
Copy link
Member

Oberon00 commented Aug 3, 2023

Hi @carolabadeer, what do you mean by "this discussion"? If you mean the one at #484 (comment) then it would be better to reply there, as the top-level PR comments have no threading functionality and it gets confusing soon.

@carlosalberto
Copy link
Contributor

Ping @tigrannajaryan

@tigrannajaryan
Copy link
Member

Sorry for slow response, I was out for a couple weeks.

Re-reading the thread I don't see any new arguments, so I think we should go ahead with a tristate enum.

Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

Recommendation:

Can you add documentation for Unset denoting that older clients may not set this field, in which case how would one figure out whether ParentSpanIsRemote?

Something like:

"In this case, ParentSpanIsRemote can be derived by looking at the parent span and determining if it has a different Resource. This value is expected from older clients."

@tigrannajaryan
Copy link
Member

Another approach is to represent this as a 2-bitfield of a new int32 field, part of which will be also used by #503

@Oberon00
Copy link
Member

@jsuereth

Can you add documentation for Unset denoting that older clients may not set this field, in which case how would one figure out whether ParentSpanIsRemote?

You can't find out. That's kind of the point of the field.

@Oberon00
Copy link
Member

@tigrannajaryan I think we should not block this PR with this, but consider this refactoring before the next release, which should probably wait until after both this PR and the flags PR(s) have been merged.

@tigrannajaryan
Copy link
Member

@tigrannajaryan I think we should not block this PR with this, but consider this refactoring before the next release, which should probably wait until after both this PR and the flags PR(s) have been merged.

I am not sure it is a good idea. This is a repository that is declared stable. We should minimize any churn here. An accidental release in an intermediate incorrect state can become a huge problem. It may be worth looking into using branches to prepare work for next releases instead of doing it on main branch.

@Oberon00
Copy link
Member

Oberon00 commented Aug 16, 2023

An accidental release in an intermediate incorrect state can become a huge problem. It may be worth looking into using branches to prepare work for next releases instead of doing it on main branch.

The state would not be incorrect, unless you view that optimization/refactoring as vital.
Stable applies only to releases, not any intermediate main branch state, right?

@tigrannajaryan
Copy link
Member

Stable applies only to releases, not any intermediate main branch state, right?

This has not been discussed.

Formally, it is likely that you are right, we only need stability guarantees to apply to releases.

However we don't currently have a good process that ensures main branch is in a state that satisfies stability guarantees before we make the release. We can work on adding such a process, but absent that I want to be careful and for now require that "main" branch state must also meet the stability guarantees. We can lift off that requirement when there are checks in place that prevent mistakes like releasing intermediary states that are not supposed to be released.

This is a high-stakes repo, we need to be extra careful here.

Again, a possible approach for this repo would be to do a branch-based development where all work for the next release (1.1 in this case) is done on a separate branch, not on "main", to make sure the release process is very explicit and there is no easy way to accidentally release from an intermediary "main" state that is not actually ready to be released. This would require merging PRs to the branch and let the changes bake for a while and then once we are happy with accumulated changes we would cut the next release by merging the branch to "main" and then making a release from "main".

There are likely other processes we can use, I am open for suggestions.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

Blocking to wait for #503 and use the introduced bit field.

@carlosalberto
Copy link
Contributor

Now that #503 has been merged, we can discuss this PR again. IIRC @tigrannajaryan wanted this information to exist in the newly added flags field in the mentioned PR, rather than exist as an independent parent_is_remote field. Could you confirm/clarify this please?

@tigrannajaryan
Copy link
Member

Now that #503 has been merged, we can discuss this PR again. IIRC @tigrannajaryan wanted this information to exist in the newly added flags field in the mentioned PR, rather than exist as an independent parent_is_remote field. Could you confirm/clarify this please?

Yes, that was my suggestion. We can take 2 more bits from flags to represent the 3 states we need for parent_is_remote.

estolfo and others added 9 commits January 11, 2024 14:35
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Johannes Tax <johannes@johannes.tax>
@AlexanderWert
Copy link
Member

@open-telemetry/specs-approvers I think this is ready to be merged!

@tigrannajaryan
Copy link
Member

@open-telemetry/specs-approvers I think this is ready to be merged!

Needs at least 2 business days since last change before merging.

@estolfo
Copy link
Contributor Author

estolfo commented Jan 23, 2024

@open-telemetry/specs-approvers can we merge this please?

@tigrannajaryan
Copy link
Member

tigrannajaryan commented Jan 23, 2024

@estolfo looks like we forgot one more thing: an entry in the CHANGELOG in the Unreleased section. Please add and we can merge.

@estolfo estolfo changed the title Indicate if a span's parent is remote using 2 bit flag as described in OTEP 0182 Indicate if a span's parent or link is remote using 2 bit flag as described in OTEP 0182 Jan 23, 2024
@estolfo
Copy link
Contributor Author

estolfo commented Jan 23, 2024

@tigrannajaryan ok done

@tigrannajaryan tigrannajaryan merged commit b5c1a78 into open-telemetry:main Jan 23, 2024
15 checks passed
@tigrannajaryan
Copy link
Member

Thank you @estolfo and everyone for patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.