-
Notifications
You must be signed in to change notification settings - Fork 186
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
Add datadog apm support #205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
not sure how dd-apm works for go projects. ok to try and see.
hopefully, we will follow the similar service naming conventions.
https://app.datadoghq.com/apm/services?end=1548721474596&env=prod&paused=false&start=1548720574596
also, do you mind adding the instructions for golang project to this guru card?
https://app.getguru.com/card/czKok5ji/Enable-Datadog-APM-for-a-project
pkg/config/middleware.go
Outdated
|
||
if Config.StatsdAPMEnabled { | ||
tracer.Start( | ||
tracer.WithAgentAddr(fmt.Sprintf("%s:%s", Config.StatsdHost, Config.StatsdPort)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhouzhuojie apm uses tcp port 8126, not udp port 8125.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will add another config then, is it by design that we use different ports in the agent setup?
@@ -17,8 +17,17 @@ import ( | |||
"github.com/sirupsen/logrus" | |||
"github.com/urfave/negroni" | |||
"github.com/yadvendar/negroni-newrelic-go-agent" | |||
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this lib includes tracers for http/gRPC out of the box? No need for further config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it doesn't trace further. It logs the whole span. If we want to trace internal spans, we need to instrument the http client, DB, or other clients. Datadog provides wrappers for those clients.
And also, Flagr has no dependencies in the evaluation requests.
a008848
to
6aed959
Compare
Codecov Report
@@ Coverage Diff @@
## master #205 +/- ##
==========================================
- Coverage 86.66% 86.14% -0.52%
==========================================
Files 23 23
Lines 1327 1335 +8
==========================================
Hits 1150 1150
- Misses 128 135 +7
- Partials 49 50 +1
Continue to review full report at Codecov.
|
Description
Adding supprt of datadog APM. It's by default disabled. Docs:https://docs.datadoghq.com/tracing/languages/go/
Motivation and Context
To support APM
How Has This Been Tested?
Local, unit and integration tests.
Types of changes
Checklist: