Comments (10)
Hey @senny , we're going to look at this in a couple of weeks. I'll keep you updated.
from dd-trace-rb.
I was hoping that #270 would allow us to split queries by using a span processor. Unfortunately, the rails.database.name
tag is always set to the default connection, regardless of the query that's being annotated.
It's a bit confusing as the name suggests that it is possible to tell different databases on the same Rails app apart.
from dd-trace-rb.
Ahhhh yeah, this is a good point. I think having the ability to configure individual ActiveRecord connections might be the best way to go here. Maybe something like:
Datadog.configure do
use :rails
end
Datadog.configure(Foo.connection, service_name: 'foo-db')
Datadog.configure(Bar.connection, service_name: 'bar-db')
...or something similar. In the shorter term, we might be able to pull the connection from the sql.active_record
event and get the correct DB name from that.
ActiveRecord needs a bit more love; I'd be happy to take a deeper dive into this when we tackle it.
from dd-trace-rb.
@delner yes, something like this would be perfect. Since it's in an initializer it should ideally not open the connection. Maybe it's possible just by using the name of the connection specification in database.yml
.
from dd-trace-rb.
@delner anything to update?
from dd-trace-rb.
@lattwood Not yet, other than it's still queued up on our roadmap. Will let you know what develops.
from dd-trace-rb.
FWIW @senny and @lattwood #383 should tag sql.active_record
events with the correct connection information now (instead of the default.) Still don't have support for tracking those different DB connections as different services yet, which is something we'll have to add.
from dd-trace-rb.
Hey @senny and @lattwood , #404 is currently in development and should resolve this. Feel free to check it out!
from dd-trace-rb.
We made another PR #451 that improves upon the configuration behavior; this is currently in review pending some other changes to our configuration API.
from dd-trace-rb.
Hey @senny , we merged #451 which should roll with our 0.14.0 release. Feel free to try it out and let us know what you think. Thanks for the suggestion; glad to have added this to the tracer! Closing this issue for now.
from dd-trace-rb.
Related Issues (20)
- Enhancement Request: Allow Manual Setting of Resource Name for Requests Failing in before_action
- Continuous Profiler does not support macOS HOT 4
- Resource tagging/management of Rails Engines dynamically mounted on initialization (SubSystem Resources) HOT 2
- ddtrace - throws error when deploying a rails 6.1 instance HOT 1
- Sinatra - missing trace_id when trying to correlate logs with traces HOT 2
- Qless support is missing from 2.0 HOT 1
- Capture tracing when a specific header is passed in an HTTP request HOT 3
- Instrumenting both Redis and Sidekiq leads to "stack level too deep (SystemStackError)" HOT 1
- GraphQL queries will error out after datadog upgrade ("Found two visible definitions") HOT 2
- With `datadog` 2.x, how can I mimic the 1.x test adapter that prints traces to `$stdout`? HOT 2
- Failed to report profiling data, connection closed before message completed HOT 3
- Anyway to make the faraday instrumentation split by domain but allow an override to not split by domain in some cases? HOT 5
- "Incompatible version of the passenger gem" even when Passenger has the right version HOT 7
- GRPC integration logging error even when tracing is disabled HOT 1
- We had a use case for Datadog::Tracing::Contrib::HTTP::Instrumentation.after_request HOT 3
- Wrong MIME/Content-Type for code provenance multipart data HOT 2
- Support tracing of Mysql2 gem prepared statements HOT 2
- Datadog::Tracing.correlation without trace information HOT 1
- AppSec crashes when parsing integer HTTP headers (undefined method `tr' for nil:NilClass (NoMethodError)) HOT 3
- Rails tracing produces duplicate mysql2 spans
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-trace-rb.