Skip to content

Conversation

@zachmccormick
Copy link

This should allow us to quantize the keys better.

Also provides a new LENGTH tag on the spans to help identify large cached items better

span.set_tag(Ext::TAG_COMMAND, cmd)
end
# BEGIN BRAZE MODIFICATION
span.set_tag(Ext::TAG_LENGTH, Core::Utils.utf8_encode([op, *args].join(' ').strip, binary: true).length)

Choose a reason for hiding this comment

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

the Quantize.format_command(op, args) above
already ran Core::Utils.utf8_encode(command, binary: true, placeholder: placeholder)

I think it would be better to only run that once, the cost of this observability is pretty high already for the use of dalli, which gets used all the time.

Also, should this tag only be added when datadog_configuration[:command_enabled] is true?

Comment on lines +30 to +33
command = command.gsub(GUID_ID_REGEX, "GUID")
command = command.gsub(BSON_ID_REGEX, "BSON")
command = command.gsub(XXHASH_REGEX, "XXHASH")
command = command.gsub(INTEGER_ID_REGEX, "INTEGER")

Choose a reason for hiding this comment

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

this could have negative perf impact, also

Copy link
Author

Choose a reason for hiding this comment

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

I don't think this will be too bad, but I'm curious if there are some relatively quick ideas we could do to make this faster. I could smush all of these together into a single expression and just replace it with ID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants