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

[opentracer] Documentation #517

Merged
merged 6 commits into from
Jul 23, 2018
Merged

Conversation

Kyle-Verhoog
Copy link
Member

Add some basic documentation for our OpenTracing implementation.

@Kyle-Verhoog Kyle-Verhoog added this to the OpenTracing milestone Jul 18, 2018
@Kyle-Verhoog Kyle-Verhoog self-assigned this Jul 18, 2018
Copy link

@palazzem palazzem left a 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': {},

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

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)

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

@Kyle-Verhoog Kyle-Verhoog merged commit 8dd5cea into opentracer Jul 23, 2018
@Kyle-Verhoog Kyle-Verhoog deleted the kyle-verhoog/opentracer-docs branch July 23, 2018 18:40
Kyle-Verhoog added a commit that referenced this pull request Sep 7, 2018
* add opentracing documentation basics
Kyle-Verhoog added a commit that referenced this pull request Sep 10, 2018
* add opentracing documentation basics
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