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

feat: add instana as possible tracing provider #1429

Merged
merged 9 commits into from
Jun 16, 2021
43 changes: 43 additions & 0 deletions docs/docs/guides/tracing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
id: tracing
title: Distributed Tracing
---

Configuring Distributed Tracing (DT) will enable you to obtain a visualization
of the call paths that take place in order to process a request made to Kratos.
It's yet another tool that you can use to aid you in profiling, debugging and
ultimately understanding your deployment of Kratos better. Kratos currently
supports the following tracing options:

- Tracing backend(s): Jaeger, Elastic APM, Datadog, Zipkin and Instana - _Note:
adding support for other
[opentracing compliant backends](https://opentracing.io/docs/supported-tracers)
is planned. To aid in priority, please
[create an issue](https://github.com/ory/kratos/issues) with your feature
request._
- Following existing traces: If you have deployed Kratos behind a proxy that has
initiated a trace, Kratos will attempt to join that trace by examining the
request headers for tracing context.

### What a Kratos trace includes

In DT speak, a trace is comprised of one or more spans which are logical units
of work. Each Kratos span is encapsulated with the following state:

- A name
- A start time
- A finish time
- A set of zero or more tags

Kratos currently creates the following spans:

- Top level span (_named after the request path_) for the requested endpoint.
Span tags: - http method - http status code - error IFF status code >= 400
- Child span will be created if bcrypt is called. Span tags: - bcrypt work
factor
- All SQL database interactions. Spans/tags will vary depending on the database
driver used.

This is still evolving and subject to change as tracing support continues to
expand in Kratos. If you see something that is missing/wrong, please create an
issue.
4 changes: 3 additions & 1 deletion docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"guides/secret-key-rotation",
"guides/high-availability-ha",
"guides/docker",
"guides/setting-up-password-hashing-parameters"
"guides/setting-up-password-hashing-parameters",
"guides/integration-with-other-systems-using-web-hooks",
"guides/tracing"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions driver/config/.schema/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1199,12 +1199,13 @@
"properties": {
"provider": {
"type": "string",
"description": "Set this to the tracing backend you wish to use. Supports Jaeger, Zipkin and DataDog. If omitted or empty, tracing will be disabled. Use environment variables to configure DataDog (see https://docs.datadoghq.com/tracing/setup/go/#configuration).",
"description": "Set this to the tracing backend you wish to use. Supports Jaeger, Zipkin, DataDog, elastic-apm and instana. If omitted or empty, tracing will be disabled. Use environment variables to configure DataDog (see https://docs.datadoghq.com/tracing/setup/go/#configuration).",
"enum": [
"jaeger",
"zipkin",
"datadog",
"elastic-apm"
"elastic-apm",
"instana"
],
"examples": [
"jaeger"
Expand Down