DataDog / dd-trace-rb

Datadog Tracing Ruby Client
https://docs.datadoghq.com/tracing/
Other
303 stars 368 forks source link

[feature] Automatically set version based on REVISION File or git HEAD commit #1123

Open akshah123 opened 3 years ago

akshah123 commented 3 years ago

It would be great if this library would automatically set version based on value from REVISION file or using git rev-parse --short HEAD command.

For example, Sentry.io's package Raven does this by following this logic: https://github.com/getsentry/raven-ruby/blob/master/lib/raven/configuration.rb#L349

marcotc commented 3 years ago

👋 @akshah123, thank you for your suggestion! We have the DD_VERSION (which represents your application version) implemented across all supported Datadog tracers, so we try to keep them consistent. I'll bring this up with my colleagues to see if this would work well for other languages as well.

That being said, I see from the link you referred that they also have special handling for Heroku and Capistrano version detection, which are two relevant technologies in the Ruby world. This makes me definitely biased towards supporting automatic version detection.

I'll let you know when I have an update, stay tuned!