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

Lots of tracing changes to make things easier to understand #1

Merged
merged 9 commits into from
Jan 18, 2024

Conversation

sulami
Copy link
Collaborator

@sulami sulami commented Jan 18, 2024

  • Instrument rake tasks
  • Split HTTP requests by domain instead of lumping them into one "service"
  • Split DB queries into different databases
  • Treat Active Record as part of the app, not the DB
  • Allow overriding config values
  • Remove the Rails dependency
  • Fallback to "unknown" instead of nil for unset required tags

This way we don't have a single "Faraday" service, but one service per
domain we connect to, which maps much better to what a service is.
Ideally we'd use the proper database name, but this is a
zero-configuration method that should be at least useful.
I don't think we actually need this.
@sulami sulami marked this pull request as ready for review January 18, 2024 07:33
@sulami sulami merged commit 961f1f8 into main Jan 18, 2024
1 check passed
@sulami sulami deleted the split-by-domain branch January 18, 2024 07:33
@@ -57,6 +64,10 @@ def statsd_port
def tracing_port
datadog_agent_uri&.port || 8126
end

def inspect
"DegicaDatadog::Config<enabled?=#{!!enabled?} service=#{service} version=#{version} environment=#{environment} repository_url=#{repository_url} datadog_agent_host=#{datadog_agent_host} statsd_port=#{statsd_port} tracing_port=#{tracing_port}>" # rubocop:disable Layout/LineLength

Choose a reason for hiding this comment

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

Just out of curiosity, where on DD will we be able to see this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This won't be on DD, but it's what you get when you open up an irb and check out DegicaDatadog::Config. I ended up checking a lot of these values over and over while tweaking settings, so having them all easily accessible might help in the future when we're debugging something like data not coming through or being wrongly tagged.

Comment on lines +17 to +22
DegicaDatadog::Config.init(
service_name: "hats",
version: "1.3",
environment: "staging",
repository_url: "github.com/degica/not-hats"
)

Choose a reason for hiding this comment

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

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants