Skip to content

[release/1.7] fix(tracing): use latest version of semconv#9427

Closed
milas wants to merge 1 commit intocontainerd:release/1.7from
milas:1.7-otel-http
Closed

[release/1.7] fix(tracing): use latest version of semconv#9427
milas wants to merge 1 commit intocontainerd:release/1.7from
milas:1.7-otel-http

Conversation

@milas
Copy link
Copy Markdown
Contributor

@milas milas commented Nov 27, 2023

All components need to use a consistent semconv version or OTel will emit errors about "cannot merge resource due to conflicting Schema URL".

Switch to the appropriate semconv version, which requires dropping usage of httpconv. Instead, the upstream HTTP client hooks are used directly. (The lower-level functions are no longer exported by OTel.)

@k8s-ci-robot
Copy link
Copy Markdown

Hi @milas. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dmcgowan
Copy link
Copy Markdown
Member

WithHTTPRequest could be replaced by function which wraps the transport. It looks like a much better interface to directly use the transport rather than request wrapping. We don't want to directly import the otel libraries from the resolve code though, we would like to reserve the ability to compile them out with tags if needed or at a minimum contain the otel library madness to the tracing package.

I assume these changes will need to get merged into main first as well.

@milas
Copy link
Copy Markdown
Contributor Author

milas commented Nov 27, 2023

WithHTTPRequest could be replaced by function which wraps the transport

Do you mean literally delete the function? While it's now useless, it's technically an exported function, so I didn't want to risk removing it, but if strict SemVer adherence isn't critical, then I'm happy to drop it.

We don't want to directly import the otel libraries from the resolve code though

ACK - is a tracing.WithHTTPTransport() func wrapper in the containerd/tracing package reasonable?

I assume these changes will need to get merged into main first as well.

Yes, definitely. Things are in a bad state in both 1.7 and 2.0/main, unfortunately 😭

I am starting with 1.7 because I'm using this commit in a WIP branch on moby/buildkit as well; I want to get a setup with functioning containerd + BuildKit + Moby tracing off their respective compatible branches, and once I know everything is working nicely together, do the PR dances to get things to the right branches.

@dmcgowan
Copy link
Copy Markdown
Member

Do you mean literally delete the function? While it's now useless, it's technically an exported function, so I didn't want to risk removing it, but if strict SemVer adherence isn't critical, then I'm happy to drop it.

I mean more the following suggestion of adding a new function. In main you can have a second commit which doesn't get backported to remove it since the next version will be 2.0.

ACK - is a tracing.WithHTTPTransport() func wrapper in the containerd/tracing package reasonable?

Seems like a reasonable interface

All components need to use a consistent `semconv` version or OTel
will emit errors about "cannot merge resource due to conflicting Schema URL".

Switch to the appropriate semconv version, which requires dropping
usage of `httpconv`. Instead, the upstream HTTP client hooks are
used directly. (The lower-level functions are no longer exported by
OTel.)

Signed-off-by: Milas Bowman <[email protected]>
@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Dec 6, 2023

Carried in #9483

@dmcgowan dmcgowan closed this Dec 6, 2023
@milas
Copy link
Copy Markdown
Contributor Author

milas commented Dec 7, 2023

Thank you for getting this over the line!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants