Conversation
dd-trace/README.md
Outdated
There was a problem hiding this comment.
Are we still automatically configuring the tracer when running the Agent?
If yes, we should certainly state it (and even explain it as the default/simple what it should be done/move this manual configuration of the Tracer is an advanced section).
dd-trace/README.md
Outdated
There was a problem hiding this comment.
As part of the example, let's should how, from inside methodSDK, you can access the span generated from the annotation, set its resource, set tags, etc...
dd-trace/README.md
Outdated
There was a problem hiding this comment.
s/so have to provide the agent/you must run the Java Agent
dd-trace/README.md
Outdated
There was a problem hiding this comment.
This explanation of the Agent shouldn't live here, it should go with the first section "Use the autotracing agent for well-known framework". Here, you just link to it.
dd-trace/README.md
Outdated
There was a problem hiding this comment.
It is good to have here the bare minimum to run the javaagent without having the user jumping to the other page (a bit like what you did at the end of the file).
dd-trace/README.md
Outdated
There was a problem hiding this comment.
I suggest a different approach.
To add instrumentation to your own code, you can use the OpenTracing API.- Then add a complete example: setting service, resource, tags, ...
- Document here the API (so that they don't have to jump to the OT doc). At the same time, we can properly document our special fields (service, resource).
- Link to the OT documentation at the end for further documentation.
There was a problem hiding this comment.
I'd suggest also including the gradle/maven string to add to your project to add as a compile time dependency.
There was a problem hiding this comment.
Should we add a new page for documented the API.
If we add the API, could it be verbose?
tylerbenson
left a comment
There was a problem hiding this comment.
I think we need to replace mentions of "autotracing". After discussing with @LotharSee, I feel it's probably best for now to not rename that project, but leave it as is. Are you ok leaving that project name alone?
dd-trace/README.md
Outdated
There was a problem hiding this comment.
When mentioning Opentracing the first time, I suggest either adding a link to either https://github.com/opentracing/opentracing-java or http://opentracing.io/.
dd-trace/README.md
Outdated
There was a problem hiding this comment.
"each operations, each traces" -> "each operation and each trace"
dd-trace/README.md
Outdated
There was a problem hiding this comment.
"example of how Opentracing works"
dd-trace/README.md
Outdated
There was a problem hiding this comment.
"Datadog uses instrumentation contributed by the community to instrument many frameworks..."
dd-trace/README.md
Outdated
There was a problem hiding this comment.
I'd suggest also including the gradle/maven string to add to your project to add as a compile time dependency.
dd-trace/README.md
Outdated
There was a problem hiding this comment.
"only useful" -> "only needed"
b488134 to
58c9cba
Compare
|
As with the other branch, I just force pushed to this branch to make sure the new maven settings are populated everywhere. Please let me know if you have troubles with this force push. |
|
@LotharSee @tylerbenson updated! |
|
|
||
|
|
||
| ### How to instrument well-known framework? | ||
| ## How to instrument your application? |
There was a problem hiding this comment.
Before this advanced section, we should provide a "Quick start guide" where we put the strict minimum to have it running (just the java agent) + say to have the Agent running. With the config defaults, that should just work.
Similar examples for other languages: https://app.datadoghq.com/apm/install
| Check the dedicated project and agent: [dd-java-agent](../dd-java-agent) | ||
| In order to start to instrument your application, you need to: | ||
|
|
||
| 1. [Configure the Datadog Tracer](#config) |
There was a problem hiding this comment.
That should be 2. instead of 1.: first you instrument your app, then you may need to tweak the config (but most of the time you won't right away).
| In order to start to instrument your application, you need to: | ||
|
|
||
| 1. [Configure the Datadog Tracer](#config) | ||
| 2. Choose one of the 3 ways to instrument an application: |
There was a problem hiding this comment.
Imho, we should not oppose these 3 ways (not "choose one"), but instead offer them all together. ie. we should word it as successive steps:
- Run the auto tracing agent
- Extend it with your own instrumentation (then in this section we document the Tracer/Span/annotation API).
| span.finish(); | ||
| } | ||
|
|
||
| } |
There was a problem hiding this comment.
We could probably add a set of more / advanced examples in a docs directory, then link to it from there. (there, we would be able to use the entire OpenTracing API with some real examples, to which people can refer).
| } | ||
| ``` | ||
|
|
||
| The method above is now instrumented. As you can see, the tracer is retrieved from a global registry, called `GlobalTracer`. |
There was a problem hiding this comment.
This is more advanced, more especially if people run the Trace Agent it is not needed and might confuse them.
We could put that with other advanced examples.
| see traces directly to your Datadog account. | ||
| The factory looks for a `dd-trace.yaml` file in the classpath. | ||
|
|
||
| Finally, do not forget to add the corresponding dependencies to your project. |
|
I agree with @LotharSee's suggestions. I'll approve, but I suggest you adopt his suggestions. |
|
Sure, I'm still continuing on that PR |
No description provided.