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

Add missing MySQL2 documentation #488

Merged
merged 2 commits into from
Jul 16, 2018
Merged

Add missing MySQL2 documentation #488

merged 2 commits into from
Jul 16, 2018

Conversation

pawelchcki
Copy link
Contributor

@pawelchcki pawelchcki commented Jul 16, 2018

MySQL2

The MySQL2 integration traces any SQL command sent through mysql2 gem.

require 'mysql2'
require 'ddtrace'

Datadog.configure do |c|
  c.use :mysql2, options
end

client = Mysql2::Client.new(:host => "localhost", :username => "root")
client.query("SELECT * FROM users WHERE group='x'")

Where options is an optional Hash that accepts the following parameters:

Key Description Default
service_name Service name used for MySQL2 instrumentation mysql2
tracer A Datadog::Tracer instance used to instrument the application. Usually you don't need to set that. Datadog.tracer

@pawelchcki pawelchcki added the docs Involves documentation label Jul 16, 2018
@pawelchcki pawelchcki added this to the 0.13.1 milestone Jul 16, 2018
@pawelchcki pawelchcki self-assigned this Jul 16, 2018
@pawelchcki pawelchcki requested a review from delner July 16, 2018 15:37
delner
delner previously approved these changes Jul 16, 2018
Copy link
Contributor

@delner delner left a comment

Choose a reason for hiding this comment

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

Looks good! There's one tiny alteration you could make, but you can merge it either way.


| Key | Description | Default |
| --- | --- | --- |
| ``service_name`` | Service name used for MySQL2 instrumentation | mysql2 |
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor non blocking but you could wrap the mysql2 with a ` sign.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done()

@pawelchcki pawelchcki merged commit 23c595c into master Jul 16, 2018
@pawelchcki pawelchcki deleted the docs/fix_mysql branch July 16, 2018 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Involves documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants