-
Notifications
You must be signed in to change notification settings - Fork 375
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
[rails] provide tags setting to include global tags from Rails settings #101
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,8 @@ module Framework | |
debug: false, | ||
trace_agent_hostname: Datadog::Writer::HOSTNAME, | ||
trace_agent_port: Datadog::Writer::PORT, | ||
env: ::Rails.env | ||
env: ::Rails.env, | ||
tags: {} | ||
}.freeze | ||
|
||
# configure Datadog settings | ||
|
@@ -47,6 +48,10 @@ def self.configure(config) | |
port: datadog_config[:trace_agent_port] | ||
) | ||
|
||
# set default tracer tags | ||
datadog_config[:tracer].set_tags(datadog_config[:tags]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering about the order here, as I understand it, what is in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that was a temporary order before choosing if |
||
datadog_config[:tracer].set_tags('env' => datadog_config[:env]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In think we're almost there, but what happens here if |
||
|
||
# set default service details | ||
datadog_config[:tracer].set_service_info( | ||
datadog_config[:default_service], | ||
|
@@ -60,8 +65,6 @@ def self.configure(config) | |
Datadog::Ext::AppTypes::CACHE | ||
) | ||
|
||
datadog_config[:tracer].set_tags('env' => datadog_config[:env]) | ||
|
||
if defined?(::ActiveRecord) | ||
begin | ||
# set default database service details and store it in the configuration | ||
|
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.
@ufoot I don't like having both, it seems we provide two different paths to do the same thing.
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.
As I said in #100 this is fine with me, providing what is the final value (if both are defined and different) needs be explicit in the docs.