-
Notifications
You must be signed in to change notification settings - Fork 227
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: add support for OTel context propagation and harmonized spans (v3.x) #1659
Conversation
@feywind Any way I can help with progressing this PR? |
@weyert Hey, glad to see you're interested :D This is an effort to sync across all the supported languages, so it might be a while before it's fully merged/released. When it's a bit further along though, I'd be interested in testing help, since you're one of the people who's more into OTel usage. This is my main project right now, so I'm hoping I can get a preview branch going soon, at the least. |
Awesome happy to try out a preview version when it is available :) |
Warning: This pull request is touching the following templated files:
|
I'm going to go ahead and base this off the 3.x branch to get it merged into that, and then I'll up-port it to 4.x. |
@@ -32,103 +32,107 @@ | |||
|
|||
const SUBSCRIBER_TIMEOUT = 10; | |||
|
|||
// [START opentelemetry_tracing] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't do console output and just focus on Cloud Trace as the default sample (since that's also what our open telemetry team's documentation points to).
@@ -51,8 +51,8 @@ | |||
"@google-cloud/precise-date": "^3.0.0", | |||
"@google-cloud/projectify": "^3.0.0", | |||
"@google-cloud/promisify": "^2.0.0", | |||
"@opentelemetry/api": "^1.0.0", | |||
"@opentelemetry/semantic-conventions": "~1.3.0", | |||
"@opentelemetry/api": "~1.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any particular reason these are locked down from ^
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it had to do with Node 12 compatibility. I found that there were some semver issues, in practice, though I'll be revisiting this for the 4.x version of the PR, so I'll probably recheck these for 3.x too.
approved code changes but still need to review tests
Can't wait for this one to get merged. I have run it locally and works well. I haven't been able to run it in the wild as we had some maddening memory issues but that might have been better I assume it adheres to the messaging outline of opentelemetry? I have to admit I don't fully understand that one |
You and I both :)
Memory issue caused by the OTel PR or something unrelated?
Such as it is, yeah. The inner workings of the GCP Pub/Sub libraries are represented in the span layout, but I don't think that's particularly specified by OTel. It's our intent to support the standard span attributes and W3C trace propagation attribute. TBD if the span structure will be identical across client libraries, like C++ has a different thing going that's based on their method call structure. Given that the 3.x release machinery is just about going, I'm planning to bring this PR up to the main branch at some point and then back-port the finished one to 3.x. |
Oh no, work code related issue. Nothing related to this PR sorry for confusing you.
Yeah, I understood their is this messaging semantic convention they are working on, like https://github.com/open-telemetry/semantic-conventions/blob/main/docs/messaging/messaging-spans.md Makes sense the span structure is the same structure between libraries :))
Makes sense but to be honest I can also fully understand it's a v4 thing |
Will re-open this later when the 4.x one is done. |
I didn't plan it this way 😹 but it's past the year support window for 3.x, and a lot of changes have happened since OTel started, so I won't be doing this back-porting work. |
Work in progress, converting the existing OTel support to use context propagation and more finely grained spans.
Fixes #1389