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

Datadog::Tracing.correlation without trace information #3773

Open
c2ofh opened this issue Jul 9, 2024 · 1 comment
Open

Datadog::Tracing.correlation without trace information #3773

c2ofh opened this issue Jul 9, 2024 · 1 comment
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one

Comments

@c2ofh
Copy link

c2ofh commented Jul 9, 2024

Current behaviour
Datadog::Tracing.correlation output does not include trace_information

Expected behaviour
Information about trace_name, trace_resource, trace_service

Steps to reproduce
Use ddtrace gem. There the information is included.
Now we switched to datadog gem as it's needed for using profiling.

How does datadog help you?
To extend our log by helpful information to support customers

Environment

  • datadog version: 2.1.0
  • Configuration block (Datadog.configure ...):
  require 'action_pack'
  require 'active_support'
  require 'active_record'
  require 'active_job'
  require 'datadog'
  require 'http'
  require 'rake'

  Datadog.configure do |c|
    c.env = 'prod'
    c.service = 'backend'
    c.version = '12.5.0'
    c.runtime_metrics.enabled = true

    c.tracing.report_hostname = true

    c.tracing.instrument :action_mailer
    c.tracing.instrument :action_pack
    c.tracing.instrument :active_support
    c.tracing.instrument :action_view
    c.tracing.instrument :action_cable
    c.tracing.instrument :active_job

    c.tracing.instrument :active_record, describes: {
      adapter:  'postgresql',
      host:     '127.0.0.1',
      port:     '5447',
      database: 'backend_p',
      username: 'backend_p'
    }, service_name: 'postgresql'

    c.tracing.instrument :httprb do |httprb|
      httprb.service_name = 'RestAPI'
      httprb.split_by_domain = false
    end

    c.tracing.instrument :rails
    c.tracing.instrument :rake
    c.tracing.instrument :sidekiq

    c.profiling.enabled = true

    c.diagnostics.startup_logs.enabled = false
  end
  • Ruby version: 2.7.3
  • Operating system: Ubuntu
  • Relevant library versions: Rails 5.2.8
@c2ofh c2ofh added bug Involves a bug community Was opened by a community member labels Jul 9, 2024
@TonyCTHsu
Copy link
Contributor

👋 @c2ofh , Thanks for reaching out. There are fields being removed from Correlation::Identifier in 2.x , https://github.com/DataDog/dd-trace-rb/blob/master/docs/UpgradeGuide2.md#log-correlation .

Information about trace_name, trace_resource, trace_service

Those fields were not part of our public API, hence they are not tested, documented and subject to changes. My understanding is that Correlation::Identifier#service is still available and should return the same result for trace_service (trace_name, trace_resource are removed)

Could you provide an example about how you add custom information into your logs?
What does the log looks like before & after.

@TonyCTHsu TonyCTHsu added feature-request A request for a new feature or change to an existing one and removed bug Involves a bug labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one
Projects
None yet
Development

No branches or pull requests

2 participants