-
Notifications
You must be signed in to change notification settings - Fork 414
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
[opentracer] Documentation #517
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.
Good as a start. But I guess the next big task should be rewrite entirely our documentation. We should have the same quality as other Tracers, for example Java is at the moment the best docs we have.
For now, let's update the snippet so we can merge it.
docs/index.rst
Outdated
'agent_port': 8126, | ||
'debug': False, | ||
'enabled': True, | ||
'global_tags': {}, |
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.
keep only:
config = {
'agent_hostname': 'localhost',
'agent_port': 8126,
}
because are the most common configs developers are changing.
Also scope_manager=ThreadLocalScopeManager
is not mandatory so let's remove it. I'd say to describe the interface, so that people knows how to set the scope_manager
, plus link to OT docs / repo for available scope managers. I prefer a snippet that is a kind of "copy-paste ready" for common cases. Also I've noticed that here we expect the instance and not the class so in any case it should be ThreadLocalScopeManager()
right?
docs/index.rst
Outdated
| `settings` | see `Advanced Usage`_ | `{}` | | ||
+---------------------+---------------------------------------------------------+---------------+ | ||
|
||
Usage |
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.
Now that I think about it, would be great if you can put some examples directly here like we do for Java docs: https://github.com/DataDog/documentation/blob/bde053b60376d517961c46047d2be0a0254cf75c/content/tracing/setup/java.md#opentracing-api
You can use the same examples, translated in Python. When we'll refactor the docs, we'll move that section in the right place.
docs/index.rst
Outdated
} | ||
return Tracer(service_name, config=config, scope_manager=ThreadLocalScopeManager) | ||
tracer = Tracer(service_name, config=config) | ||
set_global_tracer(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.
we should check what are the choices made here: opentracing/opentracing-python#95
* add opentracing documentation basics
* add opentracing documentation basics
Add some basic documentation for our OpenTracing implementation.