Skip to content

Sinatra tracing not working with 0.35+ #1035

Closed

Description

We currently have sequel tracing working with the default service_name of "postgres", but want to split it out so that we have separate reporting on each of our 3 databases. I'm trying to following the guide and use:

Datadog.configure do |conf|
  conf.use :sequel
end

db = Sequel.connect('postgres://user:password@host:port/main')
replica = Sequel.connect('postgres://user:password@host:port/replica')

Datadog.configure(db, service_name: 'primary-db')
Datadog.configure(replica, service_name: 'replica-db')

and when I enable the test adapter and watch the traces locally, I can see the traces have "service=primary-db" for example, but when we deploy to prod, the traces are missing postgres and these new service names altogether.

I'm not sure what I'm missing or doing wrong?

Using version 0.35.1

Also, how does one separate databases when you use Sequel's sharding mechanism and don't actually create a separate connection for the replica as described here?

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

Metadata

Assignees

Labels

bugInvolves a bugcommunityWas opened by a community memberintegrationsInvolves tracing integrations

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions