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

Collect runtime metrics from Ruby environment #677

Merged
merged 15 commits into from
Apr 15, 2019

Conversation

delner
Copy link
Contributor

@delner delner commented Jan 17, 2019

In an effort to improve insight into application performance, we'd like to collect metrics that describe the Ruby environment, so that this data can be displayed with traces in the Datadog trace page.

This pull request adds two major new parts to the tracer:

  • Datadog::Metrics which is an application level Statsd instance which can be used to send metrics. If Statsd is available, it will autoconfigure its client to send stats to the agent on UDP port 8125.
  • Datadog::Runtime namespace which contains functions for collecting stats from the runtime environment. This is used in the AsyncWorker thread to collect and broadcast runtime metrics to the client configured withinDatadog::Metrics.

TODO:

  • Write unit tests
  • Add runtime-id tag
  • Add service tag

@delner delner added core Involves Datadog core libraries do-not-merge/WIP Not ready for merge feature Involves a product feature labels Jan 17, 2019
@delner delner self-assigned this Jan 17, 2019
@delner delner force-pushed the feature/runtime_metric_collection branch 2 times, most recently from 5469aea to be6e3fd Compare January 23, 2019 16:35
@delner delner changed the base branch from 0.19-dev to 0.20-dev January 23, 2019 16:35
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

cool, no major issues I see

docs/GettingStarted.md Outdated Show resolved Hide resolved
@delner delner changed the base branch from 0.20-dev to 0.21-dev March 14, 2019 20:30
@delner delner force-pushed the feature/runtime_metric_collection branch 4 times, most recently from 00725c6 to d56b496 Compare March 20, 2019 22:14
@delner delner changed the base branch from 0.21-dev to 0.22-dev March 20, 2019 22:14
@delner delner force-pushed the feature/runtime_metric_collection branch 2 times, most recently from 10f1961 to 16dac13 Compare March 20, 2019 23:05
lib/ddtrace/ext/metrics.rb Show resolved Hide resolved
lib/ddtrace/metrics.rb Show resolved Hide resolved
lib/ddtrace/workers.rb Outdated Show resolved Hide resolved
@delner delner force-pushed the feature/runtime_metric_collection branch from 16dac13 to 5cf1d4a Compare March 21, 2019 07:25
lib/ddtrace/context.rb Outdated Show resolved Hide resolved
@delner delner force-pushed the feature/runtime_metric_collection branch from 5cf1d4a to dcd79f9 Compare March 27, 2019 22:17
Copy link
Contributor

@pawelchcki pawelchcki left a comment

Choose a reason for hiding this comment

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

Great Job @delner! Looks like really awesome addition!

Left one suggestion about using counters to correctly process some metrics. Otherwise looks good!

docs/GettingStarted.md Show resolved Hide resolved
@delner delner force-pushed the feature/runtime_metric_collection branch from ecea8e1 to 1b53343 Compare April 10, 2019 17:44
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

one minor doc change, otherwise this is looking great

docs/GettingStarted.md Show resolved Hide resolved
@brettlangdon brettlangdon dismissed pawelchcki’s stale review April 10, 2019 19:09

We are deferring requested changes since it doesn't really effect Ruby metrics at this time.

@pawelchcki pawelchcki self-requested a review April 10, 2019 19:32
@delner delner force-pushed the feature/runtime_metric_collection branch from 1b53343 to a30d84f Compare April 11, 2019 15:36
@brettlangdon brettlangdon removed the do-not-merge/WIP Not ready for merge label Apr 12, 2019
@brettlangdon brettlangdon merged commit 3d43a29 into 0.22-dev Apr 15, 2019
@brettlangdon brettlangdon deleted the feature/runtime_metric_collection branch April 15, 2019 14:03
@brettlangdon brettlangdon added this to the 0.22.0 milestone Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries feature Involves a product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants