-
Notifications
You must be signed in to change notification settings - Fork 369
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 DD_VERSION environment variable #982
Conversation
str | ||
end | ||
end.freeze | ||
|
||
NULL_IDENTIFIER = Identifier.new.freeze |
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.
Because the env
property of Identifier
was being resolved at initialization time, this constant would resolve its env
property to nil
at load time (if DD_ENV
wasn't set) and retain this value. Later, if users configured a different env
within the Ruby application, this instance would not use the updated value as expected, but the original value.
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.
Great work, looks clean and it was very easy to review.
# or buffered by a whitespace character to delimit it. | ||
def have_attribute(attribute) | ||
match(/.*(?<=\A|\s)#{Regexp.escape(attribute)}(?=\z|\s).*/) | ||
end |
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.
💯
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.
Thanks. Just realized I accidentally left in that greedy capture .*
while experimenting with Regexp... needed to remove this.
bc6e5fe
to
5ebb6af
Compare
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.
lgtm
To make it easier to tag traces with the application version, this pull request defines
DD_VERSION
which users can set, which will automatically:This pull request also:
service.version
tag toversion
accordingly