GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add opentelemetry instrumentation by robertlaurin · Pull Request #3414 · googleapis/google-api-ruby-client

Conversation

@robertlaurin

@robertlaurin robertlaurin commented Mar 23, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Provides instrumentation for https://github.com/open-telemetry/opentelemetry-ruby

Original draft PR feedback here #3185

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@google-cla

google-cla Bot commented Mar 23, 2021

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
  • It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot added the cla: no This human has *not* signed the Contributor License Agreement. label Mar 23, 2021
@robertlaurin robertlaurin mentioned this pull request Mar 23, 2021
[WIP] feat: add opentelemetry instrumentation #3185
Closed
robertlaurin
robertlaurin commented Mar 23, 2021
View reviewed changes
Comment thread google-apis-core/lib/google/apis/core/http_command.rb Outdated
'peer.service' => url.host.to_s
}

@opentelemetry_span = Google::Apis::Core::OpenTelemetry.instance.tracer.start_span(url.host.to_s, attributes: attributes)

@robertlaurin robertlaurin Mar 23, 2021

Copy link
Copy Markdown
Author

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.

In general, what's the best practice for naming spans? This just provides the service name. Should we include the method being called?
#3185 (comment)

That's a good question as this isn't always exactly an HTTP span, if the consumers of this instrumentation also include the http client instrumentation these spans will be wrapping the HTTP calls.

For our internal instrumentation we've been using url.host.to_s as the span name.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@robertlaurin
feat: add opentelemetry instrumentation
9683dfa
@robertlaurin
robertlaurin force-pushed the feat-add-opentelemetry branch from b1634b8 to 9683dfa Compare March 23, 2021 15:35
@google-cla

google-cla Bot commented Mar 23, 2021

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
  • It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@robertlaurin robertlaurin mentioned this pull request Mar 23, 2021
feat: instrument google apis core open-telemetry/opentelemetry-ruby#631
Closed
@robertlaurin

robertlaurin commented Apr 26, 2021

Copy link
Copy Markdown
Author

@googlebot I signed it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Apr 26, 2021
robertlaurin
robertlaurin commented May 27, 2021
View reviewed changes

@robertlaurin robertlaurin left a comment

Copy link
Copy Markdown
Author

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.

hey @dazuma, there was a bit of a delay getting approval for the CLA.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-apis-core/lib/google/apis/core/opentelemetry.rb Outdated
Comment on lines +15 to +26
require 'opentelemetry-api'

module Google
module Apis
module Core
class OpenTelemetry < OpenTelemetry::Instrumentation::Base
install { true }
present { true }
end
end
end
end

@robertlaurin robertlaurin May 27, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Author

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.

With the addition of the dynamic upgradeable tracer do we still want to make use of this?

I've removed this, I think the best version of this remove any dependencies to opentelemetry that is not the api gem.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@robertlaurin
remove otel instrumentation base dependency
db6abc9
robertlaurin
robertlaurin commented May 28, 2021
View reviewed changes
Comment thread google-apis-core/lib/google/apis/core/http_command.rb
if block_given?
yield result, nil
url_host = url.host.to_s
OTEL_TRACER.in_span(url_host) do

@robertlaurin robertlaurin May 28, 2021

Copy link
Copy Markdown
Author

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.

We have instrumentation for the underlying http lib (http client), so I think it makes sense to not duplicate all the HTTP attributes on this span.

This span also serves the purpose of grouping retired network calls under a common parent span.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@robertlaurin robertlaurin mentioned this pull request Aug 18, 2021
Google API client instrumentation open-telemetry/opentelemetry-ruby-contrib#25
Closed
@quartzmo quartzmo mentioned this pull request Sep 14, 2021
pubsub: Add OpenTelemetry tracing googleapis/google-cloud-ruby#13960
Closed
@genebean

genebean commented Jan 20, 2022

Copy link
Copy Markdown

What's the status of this work? Asking because I am very much interested in putting this to use. Also, is there additional code somewhere that would set attributes like is done for the aws_sdk in https://github.com/open-telemetry/opentelemetry-ruby/blob/f0593e7d97c62b10862c382d14f533dbc49be580/instrumentation/aws_sdk/lib/opentelemetry/instrumentation/aws_sdk/handler.rb#L23-L28 ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bajajneha27

bajajneha27 commented May 18, 2022

Copy link
Copy Markdown
Contributor

Hi @robertlaurin , I'm so sorry we completely lost track of this. Is it still updated? Would you like to take a look and update the PR accordingly?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bajajneha27

bajajneha27 commented Jun 20, 2022

Copy link
Copy Markdown
Contributor

Hi @robertlaurin
I'm closing this PR due to inactivity for now but please feel free to reopen it incase you still want to work on this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bajajneha27 bajajneha27 closed this Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@robertlaurin @genebean @bajajneha27
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.