GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Documentation by gpolaert · Pull Request #29 · DataDog/dd-trace-java Conversation
LotharSee
reviewed
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
s/so have to provide the agent/you must run the Java Agent
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I suggest a different approach.
To add instrumentation to your own code, you can use the OpenTracing API.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest also including the gradle/maven string to add to your project to add as a compile time dependency.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Should we add a new page for documented the API.
If we add the API, could it be verbose?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
When mentioning Opentracing the first time, I suggest either adding a link to either https://github.com/opentracing/opentracing-java or http://opentracing.io/.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
"each operations, each traces" -> "each operation and each trace"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
"example of how Opentracing works"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
"Datadog uses instrumentation contributed by the community to instrument many frameworks..."
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest also including the gradle/maven string to add to your project to add as a compile time dependency.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
"only useful" -> "only needed"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@LotharSee @tylerbenson updated! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
|
|
||
| ### How to instrument well-known framework? | ||
| ## How to instrument your application? |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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.
The reason will be displayed to describe this comment to others. Learn more.
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).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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.
The reason will be displayed to describe this comment to others. Learn more.
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:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| span.finish(); | ||
| } | ||
|
|
||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| ``` | ||
|
|
||
| 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.
The reason will be displayed to describe this comment to others. Learn more.
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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should start with that?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I agree with @LotharSee's suggestions. I'll approve, but I suggest you adopt his suggestions. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sure, I'm still continuing on that PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.